public function __get($name) { $getMethod = 'get' . preg_replace("`(?<=[a-z])(_([a-z]))`e", "ucfirst(strtoupper('\\2'))", trim($name)); if (!is_callable(array($this, $getMethod))) { return null; } return $this->{$getMethod}(); }
public function __get($name) { $this->__load(); return parent::__get($name); }