コード例 #1
0
ファイル: ModelFile.php プロジェクト: nevvermind/zf2
 public function getContents()
 {
     $className = $this->getFullClassName($this->_modelName, 'Model');
     $codeGenFile = new \Zend\Code\Generator\FileGenerator();
     $codeGenFile->setFilename($this->getPath());
     $codeGenFile->setClass(new \Zend\Code\Generator\ClassGenerator($className));
     return $codeGenFile->generate();
 }
コード例 #2
0
ファイル: FormFile.php プロジェクト: rafalwrzeszcz/zf2
 public function getContents()
 {
     $className = $this->getFullClassName($this->_formName, 'Form');
     $codeGenFile = new \Zend\Code\Generator\FileGenerator();
     $codeGenFile->setFilename($this->getPath());
     $codeGenFile->setClass(new \Zend\Code\Generator\ClassGenerator($className, null, null, '\\Zend\\Form\\Form', array(), array(), new MethodGenerator('init', array(), MethodGenerator::FLAG_PUBLIC, '/* Form Elements & Other Definitions Here ... */')));
     return $codeGenFile->generate();
 }