コード例 #1
0
ファイル: User.php プロジェクト: Atrejoe/Baikal
 public function get($sPropName)
 {
     if ($sPropName === "password" || $sPropName === "passwordconfirm") {
         # Special handling for password and passwordconfirm
         return "";
     }
     try {
         # does the property exist on the model object ?
         $sRes = parent::get($sPropName);
     } catch (\Exception $e) {
         # no, it may belong to the oIdentityPrincipal model object
         $sRes = $this->oIdentityPrincipal->get($sPropName);
     }
     return $sRes;
 }
コード例 #2
0
ファイル: Calendar.php プロジェクト: DamienCassou/baikal_ynh
 public function get($sPropName)
 {
     if ($sPropName === "todos") {
         # TRUE if components contains VTODO, FALSE otherwise
         if (($sComponents = $this->get("components")) !== "") {
             $aComponents = explode(",", $sComponents);
         } else {
             $aComponents = array();
         }
         return in_array("VTODO", $aComponents);
     }
     if ($sPropName === "notes") {
         # TRUE if components contains VJOURNAL, FALSE otherwise
         if (($sComponents = $this->get("components")) !== "") {
             $aComponents = explode(",", $sComponents);
         } else {
             $aComponents = array();
         }
         return in_array("VJOURNAL", $aComponents);
     }
     return parent::get($sPropName);
 }