__get() публичный Метод

Return an object property
public __get ( string $strKey ) : string
$strKey string The property name
Результат string The property value
Пример #1
0
 /**
  * Return a parameter
  *
  * @param string $strKey The parameter key
  *
  * @return mixed The parameter value
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'name':
             return $this->strCaptchaKey;
             break;
         case 'question':
             return $this->strQuestion;
             break;
         default:
             return parent::__get($strKey);
             break;
     }
 }