示例#1
0
 /** 
  * 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
 /**
  *	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;
 }