_formName = $this->_resource->getAttribute('formName'); $this->_filesystemName = ucfirst($this->_formName) . '.php'; parent::init(); } /** * getPersistentAttributes * * @return array */ public function getPersistentAttributes() { return array( 'formName' => $this->getFormName() ); } /** * getName() * * @return string */ public function getName() { return 'FormFile'; } public function getFormName() { return $this->_formName; } public function getContents() { $className = $this->getFullClassName($this->_formName, 'Form'); $codeGenFile = new Zend_CodeGenerator_Php_File(array( 'fileName' => $this->getPath(), 'classes' => array( new Zend_CodeGenerator_Php_Class(array( 'name' => $className, 'extendedClass' => 'Zend_Form', 'methods' => array( new Zend_CodeGenerator_Php_Method(array( 'name' => 'init', 'body' => '/* Form Elements & Other Definitions Here ... */', )) ) )) ) )); return $codeGenFile->generate(); } }