public function genGetter() { if ($this->_get) { $get_name = 'get' . ucfirst($this->getFixedName()); $this->_class->setMethod(\CG\Generator\PhpMethod::create($get_name)->setFinal(true)->setDocblock('/** @return ' . $this->type . ' */')->setBody('return $this->' . $this->getName() . ';')); } return $this; }