|
|
@@ -90,7 +90,13 @@ class Zend_Tool_Project_Provider_Project
|
|
|
|
|
|
$newProfile->loadFromData();
|
|
|
|
|
|
- $this->_registry->getResponse()->appendContent('Creating project at ' . $path);
|
|
|
+ $response = $this->_registry->getResponse();
|
|
|
+
|
|
|
+ $response->appendContent('Creating project at ' . $path);
|
|
|
+ $response->appendContent('Note: ', array('separator' => false, 'color' => 'yellow'));
|
|
|
+ $response->appendContent(
|
|
|
+ 'This command created a web project, '
|
|
|
+ . 'for more information setting up your VHOST, please see docs/README');
|
|
|
|
|
|
foreach ($newProfile->getIterator() as $resource) {
|
|
|
$resource->create();
|
|
|
@@ -156,6 +162,9 @@ class Zend_Tool_Project_Provider_Project
|
|
|
<sessionsDirectory enabled="false" />
|
|
|
<uploadsDirectory enabled="false" />
|
|
|
</dataDirectory>
|
|
|
+ <docsDirectory>
|
|
|
+ <file filesystemName="README.txt" defaultContentCallback="Zend_Tool_Project_Provider_Project::getDefaultReadmeContents"/>
|
|
|
+ </docsDirectory>
|
|
|
<libraryDirectory>
|
|
|
<zfStandardLibraryDirectory enabled="false" />
|
|
|
</libraryDirectory>
|
|
|
@@ -182,4 +191,49 @@ class Zend_Tool_Project_Provider_Project
|
|
|
EOS;
|
|
|
return $data;
|
|
|
}
|
|
|
+
|
|
|
+ public static function getDefaultReadmeContents($caller = null)
|
|
|
+ {
|
|
|
+ $projectDirResource = $caller->getResource()->getProfile()->search('projectDirectory');
|
|
|
+ if ($projectDirResource) {
|
|
|
+ $name = ltrim(strrchr($projectDirResource->getPath(), DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
|
|
|
+ $path = $projectDirResource->getPath() . '/public';
|
|
|
+ } else {
|
|
|
+ $path = '/path/to/public';
|
|
|
+ }
|
|
|
+
|
|
|
+ return <<< EOS
|
|
|
+README
|
|
|
+======
|
|
|
+
|
|
|
+This directory should be used to place project specfic documentation including
|
|
|
+but not limited to project notes, generated API/phpdoc documentation, or
|
|
|
+manual files generated or hand written. Ideally, this directory would remain
|
|
|
+in your development environment only and should not be deployed with your
|
|
|
+application to it's final production location.
|
|
|
+
|
|
|
+
|
|
|
+Setting Up Your VHOST
|
|
|
+=====================
|
|
|
+
|
|
|
+The following is a sample VHOST you might want to consider for your project.
|
|
|
+
|
|
|
+<VirtualHost *:80>
|
|
|
+ DocumentRoot "$path"
|
|
|
+ ServerName $name.local
|
|
|
+
|
|
|
+ # This should be omitted in the production environment
|
|
|
+ SetEnv APPLICATION_ENV development
|
|
|
+
|
|
|
+ <Directory "$path">
|
|
|
+ Options Indexes MultiViews FollowSymLinks
|
|
|
+ AllowOverride All
|
|
|
+ Order allow,deny
|
|
|
+ Allow from all
|
|
|
+ </Directory>
|
|
|
+
|
|
|
+</VirtualHost>
|
|
|
+
|
|
|
+EOS;
|
|
|
+ }
|
|
|
}
|