public function __get($name) { if ($name == 'name_path') { return $this->getTreePath(); } else { return parent::__get($name); } }