예제 #1
0
 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
 /**
  * getContents()
  *
  * @return string
  */
 public function getContents()
 {
     $filter = new \Zend\Filter\Word\DashToCamelCase();
     $className = $filter->filter($this->_projectProviderName) . 'Provider';
     $class = new ClassGenerator($className, null, null, '\\Zend\\Tool\\Project\\Provider\\AbstractProvider');
     $methods = array();
     foreach ($this->_actionNames as $actionName) {
         $methods[] = new MethodGenerator($actionName, array(), MethodGenerator::FLAG_PUBLIC, '        /** @todo Implementation */');
     }
     if ($methods) {
         $class->setMethods($methods);
     }
     $codeGenFile = new \Zend\Code\Generator\FileGenerator();
     $codeGenFile->setClass($class);
     return $codeGenFile->generate();
 }
예제 #3
0
 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();
 }