/**
  * 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;
 }
Ejemplo n.º 4
0
 /**
  * create()
  *
  * @return Zend_Tool_Project_Context_System_ProjectDirectory
  */
 public function create()
 {
     parent::create();
     return $this;
 }