예제 #1
0
 /**
  * Returns user data value.
  * @param  string  property name
  * @return mixed
  */
 public function &__get($key)
 {
     if ($key === 'id' || $key === 'roles') {
         return parent::__get($key);
     } else {
         return $this->data[$key];
     }
 }
예제 #2
0
 /**
  * Is property defined?
  * @param  string  property name
  * @return bool
  */
 public function __isset($key)
 {
     return isset($this->data[$key]) || parent::__isset($key);
 }