Ejemplo n.º 1
0
 /**
  * Call a function as a property
  *
  * @param string 		$key
  * @return mixed
  */
 public function __call_property($key)
 {
     $result = parent::__call_property($key);
     // when we recive a relation we execute it and save it
     // to the data to avoid mutlitple queries
     if ($result instanceof Model_Relation) {
         return $this->_data_store[$key] = $result->run();
     }
     return $result;
 }