Пример #1
0
 /**
  * Return an object property
  *
  * @param string $strKey The property name
  *
  * @return mixed The property value
  */
 public function __get($strKey)
 {
     if (isset($this->arrData[$strKey])) {
         return $this->arrData[$strKey];
     }
     return parent::__get($strKey);
 }
Пример #2
0
 /**
  * Return an object property
  *
  * @param string $strKey The property name
  *
  * @return string The property value
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'id':
             return $this->strId;
             break;
         case 'name':
             return $this->strName;
             break;
         case 'label':
             return $this->strLabel;
             break;
         case 'value':
             // Encrypt the value
             if ($this->arrConfiguration['encrypt']) {
                 return \Encryption::encrypt($this->varValue);
             } elseif ($this->arrConfiguration['nullIfEmpty'] && $this->varValue == '') {
                 return null;
             }
             return $this->varValue;
             break;
         case 'class':
             return $this->strClass;
             break;
         case 'prefix':
             return $this->strPrefix;
             break;
         case 'template':
             return $this->strTemplate;
             break;
         case 'wizard':
             return $this->strWizard;
             break;
         case 'required':
             return $this->arrConfiguration[$strKey];
             break;
         case 'forAttribute':
             return $this->blnForAttribute;
             break;
         case 'dataContainer':
             return $this->objDca;
             break;
         case 'activeRecord':
             return $this->objDca->activeRecord;
             break;
         default:
             if (isset($this->arrAttributes[$strKey])) {
                 return $this->arrAttributes[$strKey];
             } elseif (isset($this->arrConfiguration[$strKey])) {
                 return $this->arrConfiguration[$strKey];
             }
             break;
     }
     return parent::__get($strKey);
 }
Пример #3
0
 /**
  * Return an object property
  *
  * @param string $strKey The property name
  *
  * @return mixed The property value
  */
 public function __get($strKey)
 {
     if (isset($this->arrData[$strKey])) {
         if (is_object($this->arrData[$strKey]) && is_callable($this->arrData[$strKey])) {
             return $this->arrData[$strKey]();
         }
         return $this->arrData[$strKey];
     }
     return parent::__get($strKey);
 }