/** * Charge les médecins identiques * * @param bool $strict_cp Stricte sur la recherche par code postal * * @return self[] */ function loadExactSiblings($strict_cp = true) { $medecin = new self(); $where = array(); $where["nom"] = $this->_spec->ds->prepare(" = %", $this->nom); $where["prenom"] = $this->_spec->ds->prepare(" = %", $this->prenom); if (!$strict_cp) { $cp = substr($this->cp, 0, 2); $where["cp"] = " LIKE '{$cp}___'"; } else { $where["cp"] = " = '{$this->cp}'"; } $medecin->escapeValues(); $siblings = $medecin->loadList($where); unset($siblings[$this->_id]); return $siblings; }