diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Tool/Project/Context/System/ProjectDirectory.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Tool/Project/Context/System/ProjectDirectory.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,128 @@ +_resource->getAttribute('path'); + + // if not, get from profile + if ($projectDirectory == null) { + $projectDirectory = $this->_resource->getProfile()->getAttribute('projectDirectory'); + } + + // if not, exception. + if ($projectDirectory == null) { + require_once 'Zend/Tool/Project/Exception.php'; + throw new Zend_Tool_Project_Exception('projectDirectory cannot find the directory for this project.'); + } + + $this->_baseDirectory = rtrim($projectDirectory, '\\/'); + return $this; + } + + /** + * 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; + } + +} \ No newline at end of file