Example #1
0
 private function _getMagicAttribute($name)
 {
     if (key_exists($name, $this->_attributes)) {
         return $this->getAttribute($name, self::$attributeOutputMode);
     } elseif (isset($this->columns[$name])) {
         //it's a db column but it's not set in the attributes array.
         return null;
     } elseif ($this->_relationExists($name)) {
         return $this->_getRelated($name);
     } else {
         //					if(!isset($this->columns[$name]))
         //					return null;
         return parent::__get($name);
     }
 }
Example #2
0
 public function __get($name)
 {
     return isset($this->_attributes[$name]) ? $this->_attributes[$name] : parent::__get($name);
 }