public function __get($prop) { $method = 'get_' . $prop; if (method_exists($this, $method)) { return $this->{$method}(); } return parent::__get($prop); }