diff -r 000000000000 -r 4eba9c11703f web/Zend/Tool/Project/Context/Zf/ModelFile.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Tool/Project/Context/Zf/ModelFile.php Mon Dec 13 18:29:26 2010 +0100 @@ -0,0 +1,102 @@ +_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(); + } + + +} \ No newline at end of file