예제 #1
0
 public function init()
 {
     if ($this->_resource->hasAttribute('classNamePrefix')) {
         $this->_classNamePrefix = $this->_resource->getAttribute('classNamePrefix');
     }
     parent::init();
 }
 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_Zf_ViewControllerScriptsDirectory
  */
 public function init()
 {
     $this->_forControllerName = $this->_resource->getAttribute('forControllerName');
     $this->_filesystemName = $this->_forControllerName;
     parent::init();
     return $this;
 }
 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_Zf_TestLibraryNamespaceDirectory
  */
 public function init()
 {
     $this->_namespaceName = $this->_resource->getAttribute('namespaceName');
     $this->_filesystemName = $this->_namespaceName;
     parent::init();
     return $this;
 }
예제 #4
0
 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_Filesystem_File
  */
 public function init()
 {
     if ($this->_resource->hasAttribute('filesystemName')) {
         $this->_filesystemName = $this->_resource->getAttribute('filesystemName');
     }
     parent::init();
     return $this;
 }
 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_System_ProjectProvidersDirectory
  */
 public function init()
 {
     parent::init();
     if (file_exists($this->getPath())) {
         foreach (new DirectoryIterator($this->getPath()) as $item) {
             if ($item->isFile()) {
                 $loadableFiles[] = $item->getPathname();
             }
         }
         if ($loadableFiles) {
             // @todo process and add the files to the system for usage.
         }
     }
     return $this;
 }
 /**
  * create()
  *
  */
 public function create()
 {
     parent::create();
     $zfPath = $this->_getZfPath();
     if ($zfPath != false) {
         $zfIterator = new RecursiveDirectoryIterator($zfPath);
         foreach ($rii = new RecursiveIteratorIterator($zfIterator, RecursiveIteratorIterator::SELF_FIRST) as $file) {
             $relativePath = preg_replace('#^' . preg_quote(realpath($zfPath), '#') . '#', '', realpath($file->getPath())) . DIRECTORY_SEPARATOR . $file->getFilename();
             if (strpos($relativePath, DIRECTORY_SEPARATOR . '.') !== false) {
                 continue;
             }
             if ($file->isDir()) {
                 mkdir($this->getBaseDirectory() . DIRECTORY_SEPARATOR . $this->getFilesystemName() . $relativePath);
             } else {
                 copy($file->getPathname(), $this->getBaseDirectory() . DIRECTORY_SEPARATOR . $this->getFilesystemName() . $relativePath);
             }
         }
     }
 }
 public function create()
 {
     parent::create();
 }
 /**
  * create()
  *
  * @return Zend_Tool_Project_Context_System_ProjectDirectory
  */
 public function create()
 {
     if (file_exists($this->getPath())) {
         /*
         foreach (new DirectoryIterator($this->getPath()) as $item) {
             if (!$item->isDot()) {
                 if ($registry->getClient()->isInteractive()) {
                     // @todo prompt for override
                 } else {
                     require_once 'Zend/Tool/Project/Context/Exception.php';
                     throw new Zend_Tool_Project_Context_Exception('This directory is not empty, project creation aborted.');
                 }
                 break;
             }
         }
         */
     }
     parent::create();
     return $this;
 }
 /**
  * init()
  *
  * @return Zend_Tool_Project_Context_Zf_ControllerFile
  */
 public function init()
 {
     $this->_filesystemName = $this->_forModuleName = $this->_resource->getAttribute('forModuleName');
     parent::init();
     return $this;
 }
예제 #10
0
 /**
  * create()
  *
  * @return Zend_Tool_Project_Context_System_ProjectDirectory
  */
 public function create()
 {
     parent::create();
     return $this;
 }