当前位置: 首页>>代码示例>>PHP>>正文


PHP CMbArray::removeValue方法代码示例

本文整理汇总了PHP中CMbArray::removeValue方法的典型用法代码示例。如果您正苦于以下问题:PHP CMbArray::removeValue方法的具体用法?PHP CMbArray::removeValue怎么用?PHP CMbArray::removeValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMbArray的用法示例。


在下文中一共展示了CMbArray::removeValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testRemoveValueHasRightReturn

 public function testRemoveValueHasRightReturn()
 {
     $array = array();
     $this->assertEquals(0, $this->stub->removeValue(0, $array));
     $array = array("key1" => "value1", "key2" => "value2", "key3" => "value3");
     $this->assertEquals(1, $this->stub->removeValue("value2", $array));
     $array = array("key1" => "value1", "key2" => "value1", "key3" => "value3");
     $this->assertEquals(2, $this->stub->removeValue("value1", $array));
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:9,代码来源:CMbArrayTest.php

示例2: addAudiogramme

 function addAudiogramme($values, $value_name, $title, $mark_color, $mark_type, $mark_file = null, $line = true)
 {
     $frequences = CExamAudio::$frequences;
     $root = CAppUI::conf("root_dir");
     $image_file = "{$root}/images/icons/{$mark_file}";
     // Empty plot case
     $datay = $values;
     CMbArray::removeValue("", $datay);
     if (!count($datay)) {
         return;
     }
     $words = explode(" ", $this->title->t);
     $cote = $words[1];
     $labels = array();
     $jscalls = array();
     // Remove empty values to connect distant points
     $datax = array();
     $datay = array();
     foreach ($values as $key => $value) {
         if ($value !== "" && $value !== null) {
             $frequence = $frequences[$key];
             $jstitle = strtr($title, "\n", " ");
             $labels[] = "Modifier la valeur {$value}dB pour {$jstitle} à {$frequence}";
             $jscalls[] = "javascript:changeTonalValue('{$cote}','{$value_name}',{$key})";
             $datay[] = -intval($value);
             $datax[] = "{$key}";
             // Needs to be a string when null
         }
     }
     $p1 = new LinePlot($datay, $datax);
     $p1->mark->SetType($mark_type, $image_file, 1.0);
     $this->Add($p1);
     // Create the first line
     $p1->SetColor($mark_color);
     $p1->SetCenter();
     $p1->SetLegend($title);
     $p1->SetWeight($line ? 1 : -10);
     $p1->SetCSIMTargets($jscalls, $labels);
     // Marks
     $p1->mark->SetColor($mark_color);
     $p1->mark->SetFillColor("{$mark_color}@0.6");
     $p1->mark->SetWidth(4);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:43,代码来源:inc_graph_audio_tonal.php

示例3: addAudiogramme

 function addAudiogramme($values, $mark_color)
 {
     $pressions = CExamAudio::$pressions;
     // Empty plot case
     $datay = $values;
     CMbArray::removeValue("", $datay);
     if (!count($datay)) {
         return;
     }
     $title = $this->title->t;
     $words = explode(" ", $title);
     $cote = $words[1];
     $labels = array();
     $jscalls = array();
     // Remove empty values to connect distant points
     $datax = array();
     $datay = array();
     foreach ($values as $key => $value) {
         if ($value !== "" && $value !== null) {
             $pression = $pressions[$key];
             $jstitle = strtr($title, "\n", " ");
             $labels[] = "Modifier l'admittance {$value} ml pour {$jstitle} à la pression {$pression} mm H²0";
             $jscalls[] = "javascript:changeTympanValue('{$cote}',{$key})";
             $datay[] = $value;
             $datax[] = "{$key}";
             // Needs to be a string when null
         }
     }
     $p1 = new LinePlot($datay, $datax);
     // Create the first line
     $p1->SetColor($mark_color);
     $p1->SetCenter();
     $p1->SetWeight(1);
     $p1->SetCSIMTargets($jscalls, $labels);
     // Marks
     $p1->mark->SetType(MARK_FILLEDCIRCLE);
     $p1->mark->SetColor($mark_color);
     $p1->mark->SetFillColor("{$mark_color}@0.6");
     $p1->mark->SetWidth(4);
     $this->Add($p1);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:41,代码来源:inc_graph_audio_tympan.php

示例4: reset

                 $_object->_disabled = true;
             }
             $_selected = reset($extid);
         }
     }
 }
 // Selected object IS selected (!)
 $_selected->_selected = true;
 // Check merge
 /** @var CMbObject $result */
 $result = new $objects_class();
 $checkMerge = $result->checkMerge($objects);
 // Merge trivial fields
 foreach (array_keys($result->getPlainFields()) as $field) {
     $values = CMbArray::pluck($objects, $field);
     CMbArray::removeValue("", $values);
     // No values
     if (!count($values)) {
         $statuses[$field] = "none";
         continue;
     }
     $result->{$field} = reset($values);
     // One unique value
     if (count($values) == 1) {
         $statuses[$field] = "unique";
         continue;
     }
     // Multiple values
     $statuses[$field] = count(array_unique($values)) == 1 ? "duplicate" : "multiple";
 }
 $result->updateFormFields();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:object_merger.php

示例5: checkCodeCcam

 /**
  * Vérification du code ccam
  *
  * @return string|null
  */
 function checkCodeCcam()
 {
     $codes_ccam = explode("|", $this->codes_ccam);
     CMbArray::removeValue("", $codes_ccam);
     foreach ($codes_ccam as $_code_ccam) {
         if (!preg_match("/^[A-Z]{4}[0-9]{3}(-[0-9](-[0-9])?)?\$/i", $_code_ccam)) {
             return "Le code CCAM '{$_code_ccam}' n'est pas valide";
         }
     }
     return null;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:16,代码来源:CCodable.class.php

示例6: massCountExchanges

 /**
  * Count the exchanges for the all sejours
  *
  * @param CMbObject[] $objects CMbObject
  * @param String      $type    Type
  * @param String      $subtype Sous type
  *
  * @return void
  */
 static function massCountExchanges($objects, $type = null, $subtype = null)
 {
     if (!count($objects)) {
         return null;
     }
     $object = current($objects);
     $object_ids = CMbArray::pluck($objects, $object->_spec->key);
     $object_ids = array_unique($object_ids);
     CMbArray::removeValue("", $object_ids);
     if (!count($object_ids)) {
         return null;
     }
     $where = array("object_id" => CSQLDataSource::prepareIn($object_ids), "object_class" => "= '{$object->_class}'");
     if ($type) {
         $where["type"] = "= '{$type}'";
     }
     if ($subtype) {
         $where["sous_type"] = "= '{$subtype}'";
     }
     $count_exchanges = array();
     foreach (CExchangeDataFormat::getAll() as $_data_format) {
         /** @var CExchangeDataFormat $data_format */
         $data_format = new $_data_format();
         if (!$data_format->hasTable()) {
             continue;
         }
         $table_exchange = $data_format->_spec->table;
         $count_exchanges[$table_exchange] = $data_format->countMultipleList($where, null, "object_id", null, array("object_id"));
     }
     foreach ($count_exchanges as $_exchange => $_counts) {
         foreach ($_counts as $_value) {
             $total = $_value["total"];
             $object_id = $_value["object_id"];
             if (!isset($objects[$object_id]->_nb_exchanges_by_format[$_exchange])) {
                 $objects[$object_id]->_nb_exchanges_by_format[$_exchange] = 0;
             }
             $objects[$object_id]->_nb_exchanges_by_format[$_exchange] += $total;
             $objects[$object_id]->_nb_exchanges += $total;
         }
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:50,代码来源:CMbObject.class.php

示例7: array

$_type_admission = CValue::getOrSession("_type_admission", "ambucomp");
$filter_function = CValue::getOrSession("filter_function");
$date = CValue::getOrSession("date");
$granularite = CValue::getOrSession("granularite");
$readonly = CValue::getOrSession("readonly", 0);
$duree_uscpo = CValue::getOrSession("duree_uscpo", "0");
$isolement = CValue::getOrSession("isolement", "0");
$prestation_id = CValue::getOrSession("prestation_id", "");
$item_prestation_id = CValue::getOrSession("item_prestation_id");
$group_id = CGroups::loadCurrent()->_id;
if (CAppUI::conf("dPhospi prestations systeme_prestations", $group_id) == "standard") {
    CValue::setSession("prestation_id", "");
    $prestation_id = "";
}
if (is_array($services_ids)) {
    CMbArray::removeValue("", $services_ids);
}
$where = array();
$where["annule"] = "= '0'";
$where["sejour.group_id"] = "= '{$group_id}'";
$where[] = "(sejour.type != 'seances' && affectation.affectation_id IS NULL) || sejour.type = 'seances'";
$where["sejour.service_id"] = "IS NULL " . (is_array($services_ids) && count($services_ids) ? "OR `sejour`.`service_id` " . CSQLDataSource::prepareIn($services_ids) : "");
$order = null;
switch ($triAdm) {
    case "date_entree":
        $order = "entree ASC, sortie ASC";
        break;
    case "praticien":
        $order = "users_mediboard.function_id, users.user_last_name, users.user_first_name";
        break;
    case "patient":
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_vw_non_places.php

示例8: explode

$filter->_specialite = CValue::get("_specialite", 0);
$filter->convalescence = CValue::get("convalescence", 0);
$filter->consult_accomp = CValue::get("consult_accomp", 0);
$filter->_admission = CValue::get("_admission", "heure");
$filter->_ccam_libelle = CValue::get("_ccam_libelle", "1");
$filter->_coordonnees = CValue::get("_coordonnees", 0);
$filter->_notes = CValue::get("_notes", 0);
$filter->_nb_days = CValue::get("_nb_days", 0);
$filter->_by_date = CValue::get("_by_date", 0);
if ($filter->_nb_days) {
    $filter->_date_max = CMbDT::date("+{$filter->_nb_days} days", CMbDT::date($filter->_date_min)) . " 21:00:00";
}
$filter->_service = explode(",", $filter->_service);
$filter->praticien_id = explode(",", $filter->praticien_id);
CMbArray::removeValue(0, $filter->praticien_id);
CMbArray::removeValue(0, $filter->_service);
$total = 0;
$sejours = new CSejour();
$sejourReq = new CRequest();
$sejourReq->addLJoinClause("patients", "patients.patient_id = sejour.patient_id");
$sejourReq->addLJoinClause("users", "users.user_id = sejour.praticien_id");
$sejourReq->addWhereClause("sejour.{$filter->_horodatage}", "BETWEEN '{$filter->_date_min}' AND '{$filter->_date_max}'");
$sejourReq->addWhereClause("sejour.group_id", "= '{$group->_id}'");
$sejourReq->addWhereClause("sejour.annule", "= '0'");
// On supprime les sejours d'urgence
$sejourReq->addWhereClause("sejour.type", "!= 'urg'");
// Clause de filtre par spécialité / chir
if ($filter->_specialite or $filter->praticien_id) {
    $speChirs = new CMediusers();
    $speChirs = $speChirs->loadList(array("function_id" => "= '{$filter->_specialite}'"));
    if (count($filter->praticien_id)) {
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:print_planning.php

示例9: array

 $values = array();
 if (isset($_POST["_CListeChoix"])) {
     $listes = $_POST["_CListeChoix"];
     foreach ($listes as $list_id => $options) {
         $options = array_map(array('CMbString', 'htmlEntities'), $options);
         $list = new CListeChoix();
         $list->load($list_id);
         $is_empty = false;
         if ($check_to_empty_field && isset($_POST["_empty_list"][$list_id]) || !$check_to_empty_field && !isset($_POST["_empty_list"][$list_id])) {
             $values[] = "";
             $is_empty = true;
         } else {
             if ($options === array(0 => "undef")) {
                 continue;
             }
             CMbArray::removeValue("undef", $options);
             $values[] = nl2br(implode(", ", $options));
         }
         $nom = CMbString::htmlEntities($list->nom, ENT_QUOTES);
         if ($is_empty) {
             $fields[] = "<span class=\"name\">[Liste - " . $nom . "]</span>";
         } else {
             $fields[] = "[Liste - " . $nom . "]";
         }
     }
 }
 $_POST["_source"] = str_ireplace($fields, $values, $_POST["_source"]);
 // Si purge_field est valué, on effectue l'opération de nettoyage des lignes
 if (isset($_POST["purge_field"]) && $_POST["purge_field"] != "") {
     $purge_field = $_POST["purge_field"];
     $purge_field = str_replace("/", "\\/", $purge_field);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_modele_aed.php

示例10: store

 /**
  * @see parent::store()
  */
 function store()
 {
     $this->completeField("codes_cim");
     $this->_codes_cim = $this->codes_cim ? explode("|", $this->codes_cim) : array();
     if ($this->_added_code_cim) {
         $da = CCodeCIM10::get($this->_added_code_cim);
         if (!$da->exist) {
             CAppUI::setMsg("Le code CIM saisi n'est pas valide", UI_MSG_WARNING);
             return null;
         }
         $this->_codes_cim[] = $this->_added_code_cim;
     }
     if ($this->_deleted_code_cim) {
         CMbArray::removeValue($this->_deleted_code_cim, $this->_codes_cim);
     }
     $this->codes_cim = implode("|", array_unique($this->_codes_cim));
     $this->completeField("object_id", "object_class");
     if ($this->object_class == "CPatient" && $this->fieldModified("codes_cim")) {
         DSHM::remKeys("alertes-*-CPatient-" . $this->object_id);
     }
     return parent::store();
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:25,代码来源:CDossierMedical.class.php

示例11: array

 *
 * @package    Mediboard
 * @subpackage soins
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$group = CGroups::loadCurrent();
$service_id = CValue::getOrSession("service_id");
$real_time = CValue::getOrSession("real_time", 0);
$categories_id_pancarte = CValue::getOrSession("categories_id_pancarte");
if ($service_id == "NP") {
    $service_id = "";
}
if (is_array($categories_id_pancarte)) {
    CMbArray::removeValue("", $categories_id_pancarte);
}
$cond = array();
// Chargement du service
$service = new CService();
$service->load($service_id);
// Si le service en session n'est pas dans l'etablissement courant
if (CGroups::loadCurrent()->_id != $service->group_id) {
    $service_id = "";
    $service = new CService();
}
$date = CValue::getOrSession("debut");
$prescription_id = CValue::get("prescription_id");
// Chargement des configs de services
if (!$service_id) {
    $service_id = "none";
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:vw_pancarte_service.php

示例12: removeToken

 /**
  * Remove a token in the string
  *
  * @param string $string The string to reduce
  * @param string $glue   Implode/explode like glue
  * @param string $token  Token to remove
  *
  * @return string
  */
 static function removeToken($string, $glue, $token)
 {
     $tokens = explode($glue, $string);
     CMbArray::removeValue($token, $tokens);
     return implode($glue, $tokens);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:15,代码来源:CMbString.class.php

示例13: parseRawVersion

 /**
  * parse the raw version
  *
  * @param String $raw          raw message
  * @param String $country_code country code
  *
  * @return void
  */
 private function parseRawVersion($raw, $country_code = null)
 {
     $parts = explode($this->componentSeparator, $raw);
     CMbArray::removeValue("", $parts);
     $this->version = $parts[0];
     // Version spécifique française spécifiée
     if (count($parts) > 1) {
         $this->type = $parts[1];
     }
     // Dans le cas où la version passée est incorrecte on met par défaut 2.3
     if (!in_array($this->version, self::$versions)) {
         $this->version = CAppUI::conf("hprimsante default_version");
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CHPrimSanteMessage.class.php

示例14: __sleep

 /**
  * Pre-serialize magic method
  *
  * @return array Property keys to be serialized
  */
 function __sleep()
 {
     $vars = get_object_vars($this);
     unset($vars["_class"]);
     unset($vars["_spec"]);
     unset($vars["_props"]);
     unset($vars["_specs"]);
     unset($vars["_backProps"]);
     unset($vars["_backSpecs"]);
     unset($vars["_ref_module"]);
     // Non strict value Removing would purge empty arrays
     CMbArray::removeValue(null, $vars, true);
     CMbArray::removeValue("", $vars, true);
     return array_keys($vars);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:20,代码来源:CModelObject.class.php

示例15: parseRawVersion

 private function parseRawVersion($raw, $country_code = null)
 {
     $parts = explode($this->componentSeparator, $raw);
     CMbArray::removeValue("", $parts);
     $this->version = $version = $parts[0];
     $actor = $this->actor;
     $configs = new CHL7Config();
     if ($actor instanceof CInteropSender) {
         $exchange_hl7v2 = new CExchangeHL7v2();
         $configs = $exchange_hl7v2->getConfigs($actor->_guid);
     }
     // On privilégie le code du pays sur l'acteur d'intégration
     $country_code = $configs->country_code ? $configs->country_code : $country_code;
     // Recherche depuis le code du pays
     switch ($country_code) {
         case "FRA":
         case "FR":
             $this->i18n_code = "FR";
             $this->extension = $version = "FR_2.3";
             break;
         default:
     }
     // Version spécifique française spécifiée
     if (!$country_code && count($parts) > 1) {
         $this->i18n_code = $parts[1];
         $this->extension = $version = "{$parts['1']}_{$parts['2']}";
     }
     // Dans le cas où la version passée est incorrecte on met par défaut 2.5
     if (!in_array($version, self::$versions)) {
         $this->version = CAppUI::conf("hl7 default_version");
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:32,代码来源:CHL7v2Message.class.php


注:本文中的CMbArray::removeValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。