コード例 #1
0
ファイル: Souleur.php プロジェクト: antrax2013/soule-project
 /** 
  * Accesseur public en lecture sur les champs
  * @param [string] $a_name, le nom du champ à lire
  * @return [object, null] la valeur du champ ou null en cas d'exception
  * @throws Soule_Indefine_Field_Exception
  */
 public function __get($a_name)
 {
     switch ($a_name) {
         case "ptVie":
             return $this->lire_ptVie();
         default:
             return parent::__get($a_name);
     }
 }
コード例 #2
0
ファイル: Button.php プロジェクト: laraplus/form
 /**
  * @param $property
  * @return string
  */
 public function __get($property)
 {
     if ($property == 'text') {
         return $this->text;
     }
     if ($property == 'type') {
         return $this->attributes['type'];
     }
     return parent::__get($property);
 }
コード例 #3
0
ファイル: upload.php プロジェクト: jannispl/phpuush
 /**
  *	Virtual property delegator.
  */
 public function __get($sProperty)
 {
     global $pFunctions, $aGlobalConfiguration;
     switch ($sProperty) {
         case "web_url":
             return $this->web_url = $aGlobalConfiguration["files"]["domain"] . "/" . $this->alias;
         case "local_path":
             return $this->local_path = $aGlobalConfiguration["files"]["upload"] . "/" . $this->file_location;
         default:
             return parent::__get($sProperty);
     }
     return null;
 }