__get() public method

. sorry
public __get ( $str_key ) : null
$str_key
return null
Beispiel #1
0
 public function __get($key)
 {
     // checking entity attributes
     if (isset($this->{$key})) {
         return parent::__get($key);
     }
     // checking relations
     if ($this->issetRelation($key)) {
         return $this->getRelation($key);
     }
     throw new Exception('Error ' . $key . ' is not set.');
 }