_modelName = $this->_resource->getAttribute('modelName'); $this->_filesystemName = ucfirst($this->_modelName) . '.php'; parent::init(); } /** * getPersistentAttributes * * @return array */ public function getPersistentAttributes() { return array( 'modelName' => $this->getModelName() ); } /** * getName() * * @return string */ public function getName() { return 'ModelFile'; } public function getModelName() { return $this->_modelName; } public function getContents() { $className = $this->getFullClassName($this->_modelName, 'Model'); $codeGenFile = new Zend_CodeGenerator_Php_File(array( 'fileName' => $this->getPath(), 'classes' => array( new Zend_CodeGenerator_Php_Class(array( 'name' => $className, )) ) )); return $codeGenFile->generate(); } }