當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CAppUI::conf方法代碼示例

本文整理匯總了PHP中CAppUI::conf方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::conf方法的具體用法?PHP CAppUI::conf怎麽用?PHP CAppUI::conf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CAppUI的用法示例。


在下文中一共展示了CAppUI::conf方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * The constructor
  * 
  * @param string  $rooturl     The URL of the wsdl file
  * @param string  $type        The type of exchange
  * @param array   $options     An array of options
  * @param boolean $loggable    True if you want to log all the exchanges with the web service
  * @param string  $local_cert  Path of the certifacte
  * @param string  $passphrase  Pass phrase for the certificate
  * @param boolean $safe_mode   Safe mode
  * @param boolean $verify_peer Require verification of SSL certificate used
  * @param string  $cafile      Location of Certificate Authority file on local filesystem
  *
  * @throws CMbException
  *
  * @return CNuSOAPClient
  */
 function __construct($rooturl, $type = null, $options = array(), $loggable = null, $local_cert = null, $passphrase = null, $safe_mode = false, $verify_peer = false, $cafile = null)
 {
     $this->wsdl_url = $rooturl;
     if ($loggable) {
         $this->loggable = $loggable;
     }
     if ($type) {
         $this->type_echange_soap = $type;
     }
     if (!$safe_mode) {
         if (!($html = file_get_contents($this->wsdl_url))) {
             $this->soap_client_error = true;
             throw new CMbException("CSourceSOAP-unable-to-parse-url", $this->wsdl_url);
         }
         if (strpos($html, "<?xml") === false) {
             $this->soap_client_error = true;
             throw new CMbException("CSourceSOAP-wsdl-invalid");
         }
     }
     if (array_key_exists("encoding", $options)) {
         $encoding = $options["encoding"];
         $this->soap_defencoding = $encoding;
         if ($encoding == "UTF-8") {
             $this->decode_utf8 = false;
         }
     }
     if ($local_cert) {
         $this->certRequest = array("sslcertfile" => $local_cert);
     }
     if ($passphrase) {
         $this->certRequest = array("passphrase" => $passphrase);
     }
     parent::__construct($rooturl, true, false, false, false, false, CAppUI::conf("webservices connection_timeout"));
     $this->wsdl_url = $rooturl;
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:52,代碼來源:CNuSOAPClient.class.php

示例2: connect

 /**
  * Connect to a AS400 DB2 SQL server via ODBC driver
  * 
  * @throws Error on misconfigured or anavailable server
  * 
  * @return void
  */
 static function connect()
 {
     if (self::$dbh) {
         return;
     }
     $config = CAppUI::conf("sante400");
     if (null == ($dsn = $config["dsn"])) {
         trigger_error("Data Source Name not defined, please configure module", E_USER_ERROR);
         CApp::rip();
     }
     // Fake data source for chrono purposes
     CSQLDataSource::$dataSources[$dsn] = new CMySQLDataSource();
     $ds =& CSQLDataSource::$dataSources[$dsn];
     $ds->dsn = $dsn;
     self::$chrono =& CSQLDataSource::$dataSources[$dsn]->chrono;
     self::$chrono->start();
     $prefix = $config["prefix"];
     try {
         self::$dbh = new PDO("{$prefix}:{$dsn}", $config["user"], $config["pass"]);
         self::$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     } catch (PDOException $e) {
         mbTrace("cauguht failure on first datasource");
         if (null == ($dsn = $config["other_dsn"])) {
             throw $e;
         }
         self::$dbh = new PDO("{$prefix}:{$dsn}", $config["user"], $config["pass"]);
         self::$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     }
     self::$chrono->stop("connection");
     self::traceChrono("connection");
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:38,代碼來源:CRecordSante400.class.php

示例3: doRedirect

 /**
  * @see parent::doRedirect()
  */
 function doRedirect()
 {
     if (CAppUI::conf("dPsalleOp CActeCCAM codage_strict") || !$this->_old->_id || !$this->_obj->_id) {
         $this->_ref_object->correctActes();
     }
     parent::doRedirect();
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:10,代碼來源:do_acteccam_aed.php

示例4: loadTikaInfos

 /**
  * Méthode permettant de tester si le service d'extraction Tika est actif
  *
  * @return string
  */
 function loadTikaInfos()
 {
     $conf_host = trim(CAppUI::conf("search tika_host"));
     $conf_port = trim(CAppUI::conf("search tika_port"));
     $client = new CHTTPClient("http://{$conf_host}:{$conf_port}/tika");
     return $client->get();
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:12,代碼來源:CSearchFileWrapper.class.php

示例5: generateEnteteMessageAcquittement

 /**
  * @see parent::generateEnteteMessageAcquittement()
  */
 function generateEnteteMessageAcquittement($statut, $codes = null, $commentaires = null)
 {
     $echg_hprim = $this->_ref_echange_hprim;
     $identifiant = $echg_hprim->_id ? str_pad($echg_hprim->_id, 6, '0', STR_PAD_LEFT) : "ES{$this->now}";
     $acquittementsServeurActivitePmsi = $this->addElement($this, $this->acquittement, null, "http://www.hprim.org/hprimXML");
     $this->addAttribute($acquittementsServeurActivitePmsi, "version", CAppUI::conf("hprimxml {$this->evenement} version"));
     $enteteMessageAcquittement = $this->addElement($acquittementsServeurActivitePmsi, "enteteMessage");
     $this->addAttribute($enteteMessageAcquittement, "statut", $statut);
     $this->addElement($enteteMessageAcquittement, "identifiantMessage", $identifiant);
     $this->addDateTimeElement($enteteMessageAcquittement, "dateHeureProduction");
     $emetteur = $this->addElement($enteteMessageAcquittement, "emetteur");
     $agents = $this->addElement($emetteur, "agents");
     $this->addAgent($agents, "application", "MediBoard", "Gestion des Etablissements de Santé");
     $group = CGroups::loadCurrent();
     $group->loadLastId400();
     $this->addAgent($agents, $this->getAttSysteme(), CAppUI::conf('mb_id'), $group->text);
     $echg_hprim->loadRefsInteropActor();
     // Pour un acquittement l'emetteur du message devient destinataire
     $destinataire = $this->addElement($enteteMessageAcquittement, "destinataire");
     $agents = $this->addElement($destinataire, "agents");
     $this->addAgent($agents, "application", $echg_hprim->_ref_sender->nom, $echg_hprim->_ref_sender->libelle);
     /* @todo Doit-on gérer le système du destinataire ? */
     //$this->addAgent($agents, "système", $group->_id, $group->text);
     $this->addElement($enteteMessageAcquittement, "identifiantMessageAcquitte", $this->_identifiant_acquitte);
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:28,代碼來源:CHPrimXMLAcquittementsServeurActivitePmsi.class.php

示例6: CDoObjectAddEdit

 /**
  * Constructor
  *
  * @param string $className Class name
  * @param int    $objectKey Object key name
  */
 function CDoObjectAddEdit($className, $objectKey = null)
 {
     if (CAppUI::conf("readonly")) {
         CAppUI::stepAjax("Mode-readonly-title", UI_MSG_ERROR);
         return;
     }
     global $m;
     $this->className = $className;
     $this->postRedirect = null;
     $this->redirect = "m={$m}";
     $this->redirectStore = null;
     $this->redirectError = null;
     $this->redirectDelete = null;
     $this->createMsg = CAppUI::tr("{$className}-msg-create");
     $this->modifyMsg = CAppUI::tr("{$className}-msg-modify");
     $this->deleteMsg = CAppUI::tr("{$className}-msg-delete");
     $this->request =& $_POST;
     $this->_logIt = true;
     // @todo : à supprimer cf déplacement dans le doBind()
     $this->_obj = new $this->className();
     $this->_old = new $this->className();
     $this->onAfterInstanciation();
     // Lancer ceci apres chaque instanciation de _obj et _old !!
     $this->objectKey = $objectKey ? $objectKey : $this->_obj->_spec->key;
     $this->objectKeys = $this->objectKey . "s";
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:32,代碼來源:CDoObjectAddEdit.class.php

示例7: checkProtection

 /**
  * Check anti-CSRF protection
  */
 static function checkProtection()
 {
     if (!CAppUI::conf("csrf_protection") || strtoupper($_SERVER['REQUEST_METHOD']) != 'POST') {
         return;
     }
     if (!isset($_POST["csrf"])) {
         CAppUI::setMsg("CCSRF-no_token", UI_MSG_ERROR);
         return;
     }
     if (array_key_exists($_POST['csrf'], $_SESSION["tokens"])) {
         $token = $_SESSION['tokens'][$_POST['csrf']];
         if ($token["lifetime"] >= time()) {
             foreach ($token["fields"] as $_field => $_value) {
                 if (CValue::read($_POST, $_field) != $_value) {
                     CAppUI::setMsg("CCSRF-form_corrupted", UI_MSG_ERROR);
                     unset($_SESSION['tokens'][$_POST['csrf']]);
                     return;
                 }
             }
             //mbTrace("Le jeton est accepté !");
             unset($_SESSION['tokens'][$_POST['csrf']]);
         } else {
             CAppUI::setMsg("CCSRF-token_outdated", UI_MSG_ERROR);
             unset($_SESSION['tokens'][$_POST['csrf']]);
         }
         return;
     }
     CAppUI::setMsg("CCSRF-token_does_not_exist", UI_MSG_ERROR);
     return;
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:33,代碼來源:CCSRF.class.php

示例8: mbAutoload

/**
 * Mediboard class autoloader
 * 
 * @param string $class Class to be loaded
 * 
 * @return bool
 */
function mbAutoload($class)
{
    $file_exists = false;
    $time = microtime(true);
    // Entry already in cache
    if (isset(CApp::$classPaths[$class])) {
        // The class is known to not be in MB
        if (CApp::$classPaths[$class] === false) {
            return false;
        }
        // Load it if we can
        if ($file_exists = file_exists(CApp::$classPaths[$class])) {
            CApp::$performance["autoloadCount"]++;
            return include_once CApp::$classPaths[$class];
        }
    }
    // File moved ?
    if (!$file_exists) {
        unset(CApp::$classPaths[$class]);
    }
    // CSetup* class
    if (preg_match('/^CSetup(.+)$/', $class, $matches)) {
        $dirs = array("modules/{$matches['1']}/setup.php");
    } else {
        $class_file = $class;
        $suffix = ".class";
        // Namespaced class
        if (strpos($class_file, "\\") !== false) {
            $namespace = explode("\\", $class_file);
            // Mediboard class
            if ($namespace[0] === "Mediboard") {
                array_shift($namespace);
                $class_file = implode("/", $namespace);
            } else {
                $class_file = "vendor/" . implode("/", $namespace);
                $suffix = "";
            }
        }
        $class_file .= $suffix;
        $dirs = array("classes/{$class_file}.php", "classes/*/{$class_file}.php", "mobile/*/{$class_file}.php", "modules/*/classes/{$class_file}.php", "modules/*/classes/*/{$class_file}.php", "modules/*/classes/*/*/{$class_file}.php", "install/classes/{$class_file}.php");
    }
    $rootDir = CAppUI::conf("root_dir");
    $class_path = false;
    foreach ($dirs as $dir) {
        $files = glob("{$rootDir}/{$dir}");
        foreach ($files as $filename) {
            include_once $filename;
            // The class was found
            if (class_exists($class, false) || interface_exists($class, false)) {
                $class_path = $filename;
                break 2;
            }
        }
    }
    // Class not found, it is not in MB
    CApp::$classPaths[$class] = $class_path;
    SHM::put("class-paths", CApp::$classPaths);
    CApp::$performance["autoload"][$class] = (microtime(true) - $time) * 1000;
    return $class_path !== false;
}
開發者ID:fbone,項目名稱:mediboard4,代碼行數:67,代碼來源:autoload.php

示例9: __construct

 /**
  * @see parent::__construct
  */
 function __construct()
 {
     $this->evenement = "evt_serveurintervention";
     $this->acquittement = "acquittementsServeurActes";
     $version = str_replace(".", "", CAppUI::conf("hprimxml {$this->evenement} version"));
     parent::__construct("serveurActivitePmsi_v{$version}", "msgAcquittementsServeurActes{$version}");
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:10,代碼來源:CHPrimXMLAcquittementsServeurIntervention.class.php

示例10: mine

 static function mine($parent_class)
 {
     $classes = CApp::getChildClasses($parent_class);
     $limit = CAppUI::conf("dataminer_limit");
     foreach ($classes as $_class) {
         $miner = new $_class();
         $report = $miner->mineSome($limit, "mine");
         $dt = CMbDT::dateTime();
         echo "<{$dt}> Miner: {$_class}. Success mining count is '" . $report["success"] . "'\n";
         if (!$report["failure"]) {
             echo "<{$dt}> Miner: {$_class}. Failure mining counts is '" . $report["failure"] . "'\n";
         }
         $miner = new $_class();
         $report = $miner->mineSome($limit, "remine");
         $dt = CMbDT::dateTime();
         echo "<{$dt}> Reminer: {$_class}. Success remining count is '" . $report["success"] . "'\n";
         if (!$report["failure"]) {
             echo "<{$dt}> Reminer: {$_class}. Failure remining counts is '" . $report["failure"] . "'\n";
         }
         $miner = new $_class();
         $report = $miner->mineSome($limit, "postmine");
         $dt = CMbDT::dateTime();
         echo "<{$dt}> Postminer: {$_class}. Success postmining count is '" . $report["success"] . "'\n";
         if (!$report["failure"]) {
             echo "<{$dt}> Postminer: {$_class}. Failure postmining counts is '" . $report["failure"] . "'\n";
         }
     }
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:28,代碼來源:CDataMinerWorker.class.php

示例11: onAfterStore

 /**
  * @see parent::onAfterStore()
  */
 function onAfterStore(CMbObject $mbObject)
 {
     if (!$this->isHandled($mbObject)) {
         return false;
     }
     /** @var CConsultation $consultation */
     $consultation = $mbObject;
     $praticien = $consultation->loadRefPraticien();
     if (!$praticien || $praticien && !$praticien->_id) {
         return false;
     }
     $function = $praticien->loadRefFunction();
     if (!$function || $function && !$function->_id) {
         return false;
     }
     $functions = CAppUI::conf("ihe RAD-3 function_ids");
     $functions = explode("|", $functions);
     if (!in_array($function->_id, $functions)) {
         return false;
     }
     $code = "O01";
     if (!$this->isMessageSupported($this->transaction, $this->message, $code, $consultation->_receiver)) {
         return false;
     }
     $this->sendITI($this->profil, $this->transaction, $this->message, $code, $consultation);
     return true;
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:30,代碼來源:CRAD3DelegatedHandler.class.php

示例12: logForSejour

 /**
  * logSejourAccess
  *
  * @param CSejour $sejour
  *
  * @return bool has the access been logged
  */
 static function logForSejour($sejour)
 {
     $group = $sejour->loadRefEtablissement();
     if (!CAppUI::conf("admin CLogAccessMedicalData enable_log_access", $group) || !$sejour->_id) {
         return false;
     }
     $user = CMediusers::get();
     $conf = CAppUI::conf("admin CLogAccessMedicalData round_datetime", $group);
     $datetime = CMbDT::dateTime();
     switch ($conf) {
         case '1m':
             // minute
             $datetime = CMbDT::format($datetime, "%y-%m-%d %H:%M:00");
             break;
         case '10m':
             // 10 minutes
             $minute = CMbDT::format($datetime, "%M");
             $minute = str_pad(floor($minute / 10) * 10, 2, 0, STR_PAD_RIGHT);
             $datetime = CMbDT::format($datetime, "%y-%m-%d %H:{$minute}:00");
             break;
         case '1d':
             // 1 day
             $datetime = CMbDT::format($datetime, "%y-%m-%d 00:00:00");
             break;
         default:
             // 1 hour
             $datetime = CMbDT::format($datetime, "%y-%m-%d %H:00:00");
             break;
     }
     return self::logintoDb($user->_id, $sejour->_class, $sejour->_id, $datetime, $group->_id);
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:38,代碼來源:CLogAccessMedicalData.class.php

示例13: __call

 /**
  * Magic method (do not call directly).
  * @param string $name method name
  * @param array  $args arguments
  *
  * @return mixed
  *
  * @throws Exception
  * @throws CMbException
  */
 function __call($name, $args)
 {
     $name = strtolower($name);
     $silent = strncmp($name, 'try', 3) === 0;
     $function_name = $silent ? substr($name, 3) : $name;
     $function_name = '_' . (isset(self::$aliases[$function_name]) ? self::$aliases[$function_name] : $function_name);
     if (!method_exists($this, $function_name)) {
         throw new CMbException("CSourceFTP-call-undefined-method", $name);
     }
     if ($function_name == "_init") {
         return call_user_func_array(array($this, $function_name), $args);
     }
     if (!$this->loggable) {
         try {
             return call_user_func_array(array($this, $function_name), $args);
         } catch (CMbException $fault) {
             throw $fault;
         }
     }
     $echange_ftp = new CExchangeFTP();
     $echange_ftp->date_echange = CMbDT::dateTime();
     $echange_ftp->emetteur = CAppUI::conf("mb_id");
     $echange_ftp->destinataire = $this->hostname;
     $echange_ftp->function_name = $name;
     CApp::$chrono->stop();
     $chrono = new Chronometer();
     $chrono->start();
     $output = null;
     try {
         $output = call_user_func_array(array($this, $function_name), $args);
     } catch (CMbException $fault) {
         $echange_ftp->date_echange = CMbDT::dateTime();
         $echange_ftp->output = $fault->getMessage();
         $echange_ftp->ftp_fault = 1;
         $echange_ftp->store();
         CApp::$chrono->start();
         throw $fault;
     }
     $chrono->stop();
     CApp::$chrono->start();
     // response time
     $echange_ftp->response_time = $chrono->total;
     // Truncate input and output before storing
     $args = array_map_recursive(array("CFTP", "truncate"), $args);
     $echange_ftp->input = serialize($args);
     if ($echange_ftp->ftp_fault != 1) {
         if ($function_name == "_getlistfiles") {
             // Truncate le tableau des fichiers reçus dans le cas où c'est > 100
             $array_count = count($output);
             if ($array_count > 100) {
                 $output = array_slice($output, 0, 100);
                 $output["count"] = "{$array_count} files";
             }
         }
         $echange_ftp->output = serialize(array_map_recursive(array("CFTP", "truncate"), $output));
     }
     $echange_ftp->store();
     return $output;
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:69,代碼來源:CFTP.class.php

示例14: extractFiles

/**
 * Extract files
 *
 * @param string $schemaDir  Schema directory
 * @param string $schemaFile Schema files
 * @param bool   $delOldDir  Delete old directory
 *
 * @return void
 */
function extractFiles($schemaDir, $schemaFile, $delOldDir = false)
{
    $baseDir = "modules/hprimxml/xsd";
    $destinationDir = "{$baseDir}/{$schemaDir}";
    $archivePath = "{$baseDir}/{$schemaFile}";
    if ($delOldDir && file_exists($destinationDir)) {
        if (CMbPath::remove($destinationDir)) {
            echo "<div class='info'>Suppression de {$destinationDir}</div>";
        } else {
            echo "<div class='error'>Impossible de supprimer le dossier {$destinationDir}</div>";
            return;
        }
    }
    if (false != ($nbFiles = CMbPath::extract($archivePath, $destinationDir))) {
        echo "<div class='info'>Extraction de {$nbFiles} fichiers pour {$schemaDir}</div>";
    } else {
        echo "<div class='error'>Impossible d'extraire l'archive {$schemaFile}</div>";
        return;
    }
    if (CAppUI::conf("hprimxml concatenate_xsd")) {
        $rootFiles = glob("{$destinationDir}/msg*.xsd");
        $includeFiles = array_diff(glob("{$destinationDir}/*.xsd"), $rootFiles);
        foreach ($rootFiles as $rootFile) {
            $xsd = new CHPrimXMLSchema();
            $xsd->loadXML(file_get_contents($rootFile));
            $xpath = new DOMXPath($xsd);
            $importFiles = array();
            foreach ($includeFiles as $includeFile) {
                $include = new DOMDOcument();
                $include->loadXML(file_get_contents($includeFile));
                $isImport = false;
                foreach ($importFiles as $key => $value) {
                    if (strpos($includeFile, $key) !== false) {
                        $isImport = true;
                        break;
                    }
                }
                foreach ($include->documentElement->childNodes as $child) {
                    $impNode = $xsd->importNode($child, true);
                    $existing = false;
                    if (in_array($impNode->nodeName, array("xsd:simpleType", "xsd:complexType"))) {
                        $name = $impNode->getAttribute('name');
                        $existing = $xpath->query("//{$impNode->nodeName}[@name='{$name}']")->length > 0;
                    }
                    if ($isImport) {
                        $xsd->documentElement->setAttribute("xmlns:insee", "http://www.hprim.org/inseeXML");
                    }
                    if (!$existing) {
                        $xsd->documentElement->appendChild($impNode);
                    }
                }
            }
            $xsd->purgeImportedNamespaces();
            $xsd->purgeIncludes();
            file_put_contents(substr($rootFile, 0, -4) . ".xml", $xsd->saveXML());
            echo "<div class='info'>Schéma concatené</div>";
        }
    }
}
開發者ID:fbone,項目名稱:mediboard4,代碼行數:68,代碼來源:ajax_do_cfg_action.php

示例15: updateFormFields

 /**
  * @see parent::updateFormFields()
  */
 function updateFormFields()
 {
     parent::updateFormFields();
     $this->_view = "Allaitement du " . CMbDT::transform($this->date_debut, null, CAppUI::conf("date")) . " à " . CMbDT::transform($this->date_debut, null, CAppUI::conf("time"));
     if ($this->date_fin) {
         $this->_view .= " au " . CMbDT::transform($this->date_fin, null, CAppUI::conf("date")) . " à " . CMbDT::transform($this->date_fin, null, CAppUI::conf("time"));
     }
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:11,代碼來源:CAllaitement.class.php


注:本文中的CAppUI::conf方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。