/** * @param string $prop * @return mixed|null */ public function __get($prop) { $method = "get_" . $prop; if (method_exists($this, $method)) { return $this->{$method}(); } return parent::__get($prop); }
/** * @param string $prop * @return mixed|null */ public function __get($prop) { $method = "get_" . $prop; if (method_exists($this, $method)) { return $this->{$method}(); } return parent::__get($prop); }