Explorar o código

[ZF-11269] Zend_Tool

- Wrong environment variables in docs http://zendframework.com/manual/en/zend.tool.usage.cli.html.


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24255 44c647ce-9c0f-0410-b52a-842ac1e357ba
ramon %!s(int64=14) %!d(string=hai) anos
pai
achega
916551bcef
Modificáronse 2 ficheiros con 110 adicións e 110 borrados
  1. 106 106
      bin/zf.php
  2. 4 4
      documentation/manual/en/module_specs/Zend_Tool-Usage-CLI.xml

+ 106 - 106
bin/zf.php

@@ -22,7 +22,7 @@
 
 
 /**
 /**
  * ZF
  * ZF
- *  
+ *
  * @category   Zend
  * @category   Zend
  * @package    Zend_Tool
  * @package    Zend_Tool
  * @subpackage Framework
  * @subpackage Framework
@@ -36,35 +36,35 @@ class ZF
      * @var bool
      * @var bool
      */
      */
     protected $_clientLoaded = false;
     protected $_clientLoaded = false;
-    
+
     /**
     /**
      * @var string
      * @var string
      */
      */
     protected $_mode = 'runTool';
     protected $_mode = 'runTool';
-    
+
     /**
     /**
      * @var array of messages
      * @var array of messages
      */
      */
     protected $_messages = array();
     protected $_messages = array();
-    
+
     /**
     /**
      * @var string
      * @var string
      */
      */
     protected $_homeDirectory = null;
     protected $_homeDirectory = null;
-    
+
     /**
     /**
      * @var string
      * @var string
      */
      */
     protected $_storageDirectory = null;
     protected $_storageDirectory = null;
-    
+
     /**
     /**
      * @var string
      * @var string
      */
      */
     protected $_configFile = null;
     protected $_configFile = null;
-    
+
     /**
     /**
      * main()
      * main()
-     * 
+     *
      * @return void
      * @return void
      */
      */
     public static function main()
     public static function main()
@@ -73,10 +73,10 @@ class ZF
         $zf->bootstrap();
         $zf->bootstrap();
         $zf->run();
         $zf->run();
     }
     }
-    
+
     /**
     /**
      * bootstrap()
      * bootstrap()
-     * 
+     *
      * @return ZF
      * @return ZF
      */
      */
     public function bootstrap()
     public function bootstrap()
@@ -86,15 +86,15 @@ class ZF
         $this->_homeDirectory    = $this->_detectHomeDirectory();
         $this->_homeDirectory    = $this->_detectHomeDirectory();
         $this->_storageDirectory = $this->_detectStorageDirectory();
         $this->_storageDirectory = $this->_detectStorageDirectory();
         $this->_configFile       = $this->_detectConfigFile();
         $this->_configFile       = $this->_detectConfigFile();
-        
+
         // setup
         // setup
         $this->_setupPHPRuntime();
         $this->_setupPHPRuntime();
         $this->_setupToolRuntime();
         $this->_setupToolRuntime();
     }
     }
-    
+
     /**
     /**
      * run()
      * run()
-     * 
+     *
      * @return ZF
      * @return ZF
      */
      */
     public function run()
     public function run()
@@ -117,13 +117,13 @@ class ZF
                 $this->_runTool();
                 $this->_runTool();
                 break;
                 break;
         }
         }
-        
+
         return $this;
         return $this;
     }
     }
-    
+
     /**
     /**
      * _detectMode()
      * _detectMode()
-     * 
+     *
      * @return ZF
      * @return ZF
      */
      */
     protected function _detectMode()
     protected function _detectMode()
@@ -131,32 +131,32 @@ class ZF
         $arguments = $_SERVER['argv'];
         $arguments = $_SERVER['argv'];
 
 
         $mode = 'runTool';
         $mode = 'runTool';
-        
+
         if (!isset($arguments[0])) {
         if (!isset($arguments[0])) {
             return $mode;
             return $mode;
         }
         }
-        
+
         if ($arguments[0] == $_SERVER['PHP_SELF']) {
         if ($arguments[0] == $_SERVER['PHP_SELF']) {
             $this->_executable = array_shift($arguments);
             $this->_executable = array_shift($arguments);
         }
         }
-        
+
         if (!isset($arguments[0])) {
         if (!isset($arguments[0])) {
             return $mode;
             return $mode;
         }
         }
-        
+
         if ($arguments[0] == '--setup') {
         if ($arguments[0] == '--setup') {
             $mode = 'runSetup';
             $mode = 'runSetup';
         } elseif ($arguments[0] == '--info') {
         } elseif ($arguments[0] == '--info') {
             $mode = 'runInfo';
             $mode = 'runInfo';
         }
         }
-        
+
         return $mode;
         return $mode;
     }
     }
-    
+
 
 
     /**
     /**
      * _detectHomeDirectory() - detect the home directory in a variety of different places
      * _detectHomeDirectory() - detect the home directory in a variety of different places
-     * 
+     *
      * @param bool $mustExist Should the returned value already exist in the file system
      * @param bool $mustExist Should the returned value already exist in the file system
      * @param bool $returnMessages Should it log messages for output later
      * @param bool $returnMessages Should it log messages for output later
      * @return string
      * @return string
@@ -164,7 +164,7 @@ class ZF
     protected function _detectHomeDirectory($mustExist = true, $returnMessages = true)
     protected function _detectHomeDirectory($mustExist = true, $returnMessages = true)
     {
     {
         $homeDirectory = null;
         $homeDirectory = null;
-        
+
         $homeDirectory = getenv('ZF_HOME'); // check env var ZF_HOME
         $homeDirectory = getenv('ZF_HOME'); // check env var ZF_HOME
         if ($homeDirectory) {
         if ($homeDirectory) {
             $this->_logMessage('Home directory found in environment variable ZF_HOME with value ' . $homeDirectory, $returnMessages);
             $this->_logMessage('Home directory found in environment variable ZF_HOME with value ' . $homeDirectory, $returnMessages);
@@ -174,9 +174,9 @@ class ZF
                 $this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
                 $this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
             }
             }
         }
         }
-        
+
         $homeDirectory = getenv('HOME'); // HOME environment variable
         $homeDirectory = getenv('HOME'); // HOME environment variable
-        
+
         if ($homeDirectory) {
         if ($homeDirectory) {
             $this->_logMessage('Home directory found in environment variable HOME with value ' . $homeDirectory, $returnMessages);
             $this->_logMessage('Home directory found in environment variable HOME with value ' . $homeDirectory, $returnMessages);
             if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
             if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
@@ -184,11 +184,11 @@ class ZF
             } else {
             } else {
                 $this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
                 $this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
             }
             }
-            
+
         }
         }
 
 
         $homeDirectory = getenv('HOMEPATH');
         $homeDirectory = getenv('HOMEPATH');
-            
+
         if ($homeDirectory) {
         if ($homeDirectory) {
             $this->_logMessage('Home directory found in environment variable HOMEPATH with value ' . $homeDirectory, $returnMessages);
             $this->_logMessage('Home directory found in environment variable HOMEPATH with value ' . $homeDirectory, $returnMessages);
             if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
             if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
@@ -199,7 +199,7 @@ class ZF
         }
         }
 
 
         $homeDirectory = getenv('USERPROFILE');
         $homeDirectory = getenv('USERPROFILE');
-        
+
         if ($homeDirectory) {
         if ($homeDirectory) {
             $this->_logMessage('Home directory found in environment variable USERPROFILE with value ' . $homeDirectory, $returnMessages);
             $this->_logMessage('Home directory found in environment variable USERPROFILE with value ' . $homeDirectory, $returnMessages);
             if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
             if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
@@ -208,13 +208,13 @@ class ZF
                 $this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
                 $this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
             }
             }
         }
         }
-        
+
         return false;
         return false;
     }
     }
-    
+
     /**
     /**
      * _detectStorageDirectory() - Detect where the storage directory is from a variaty of possiblities
      * _detectStorageDirectory() - Detect where the storage directory is from a variaty of possiblities
-     * 
+     *
      * @param bool $mustExist Should the returned value already exist in the file system
      * @param bool $mustExist Should the returned value already exist in the file system
      * @param bool $returnMessages Should it log messages for output later
      * @param bool $returnMessages Should it log messages for output later
      * @return string
      * @return string
@@ -222,7 +222,7 @@ class ZF
     protected function _detectStorageDirectory($mustExist = true, $returnMessages = true)
     protected function _detectStorageDirectory($mustExist = true, $returnMessages = true)
     {
     {
         $storageDirectory = false;
         $storageDirectory = false;
-        
+
         $storageDirectory = getenv('ZF_STORAGE_DIR');
         $storageDirectory = getenv('ZF_STORAGE_DIR');
         if ($storageDirectory) {
         if ($storageDirectory) {
             $this->_logMessage('Storage directory path found in environment variable ZF_STORAGE_DIR with value ' . $storageDirectory, $returnMessages);
             $this->_logMessage('Storage directory path found in environment variable ZF_STORAGE_DIR with value ' . $storageDirectory, $returnMessages);
@@ -232,9 +232,9 @@ class ZF
                 $this->_logMessage('Storage directory does not exist at ' . $storageDirectory, $returnMessages);
                 $this->_logMessage('Storage directory does not exist at ' . $storageDirectory, $returnMessages);
             }
             }
         }
         }
-        
-        $homeDirectory = ($this->_homeDirectory) ? $this->_homeDirectory : $this->_detectHomeDirectory(true, false); 
-        
+
+        $homeDirectory = ($this->_homeDirectory) ? $this->_homeDirectory : $this->_detectHomeDirectory(true, false);
+
         if ($homeDirectory) {
         if ($homeDirectory) {
             $storageDirectory = $homeDirectory . '/.zf/';
             $storageDirectory = $homeDirectory . '/.zf/';
             $this->_logMessage('Storage directory assumed in home directory at location ' . $storageDirectory, $returnMessages);
             $this->_logMessage('Storage directory assumed in home directory at location ' . $storageDirectory, $returnMessages);
@@ -244,13 +244,13 @@ class ZF
                 $this->_logMessage('Storage directory does not exist at ' . $storageDirectory, $returnMessages);
                 $this->_logMessage('Storage directory does not exist at ' . $storageDirectory, $returnMessages);
             }
             }
         }
         }
-        
+
         return false;
         return false;
     }
     }
-    
+
     /**
     /**
      * _detectConfigFile() - Detect config file location from a variety of possibilities
      * _detectConfigFile() - Detect config file location from a variety of possibilities
-     * 
+     *
      * @param bool $mustExist Should the returned value already exist in the file system
      * @param bool $mustExist Should the returned value already exist in the file system
      * @param bool $returnMessages Should it log messages for output later
      * @param bool $returnMessages Should it log messages for output later
      * @return string
      * @return string
@@ -258,7 +258,7 @@ class ZF
     protected function _detectConfigFile($mustExist = true, $returnMessages = true)
     protected function _detectConfigFile($mustExist = true, $returnMessages = true)
     {
     {
         $configFile = null;
         $configFile = null;
-        
+
         $configFile = getenv('ZF_CONFIG_FILE');
         $configFile = getenv('ZF_CONFIG_FILE');
         if ($configFile) {
         if ($configFile) {
             $this->_logMessage('Config file found environment variable ZF_CONFIG_FILE at ' . $configFile, $returnMessages);
             $this->_logMessage('Config file found environment variable ZF_CONFIG_FILE at ' . $configFile, $returnMessages);
@@ -268,7 +268,7 @@ class ZF
                 $this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
                 $this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
             }
             }
         }
         }
-        
+
         $homeDirectory = ($this->_homeDirectory) ? $this->_homeDirectory : $this->_detectHomeDirectory(true, false);
         $homeDirectory = ($this->_homeDirectory) ? $this->_homeDirectory : $this->_detectHomeDirectory(true, false);
         if ($homeDirectory) {
         if ($homeDirectory) {
             $configFile = $homeDirectory . '/.zf.ini';
             $configFile = $homeDirectory . '/.zf.ini';
@@ -279,7 +279,7 @@ class ZF
                 $this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
                 $this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
             }
             }
         }
         }
-        
+
         $storageDirectory = ($this->_storageDirectory) ? $this->_storageDirectory : $this->_detectStorageDirectory(true, false);
         $storageDirectory = ($this->_storageDirectory) ? $this->_storageDirectory : $this->_detectStorageDirectory(true, false);
         if ($storageDirectory) {
         if ($storageDirectory) {
             $configFile = $storageDirectory . '/zf.ini';
             $configFile = $storageDirectory . '/zf.ini';
@@ -290,27 +290,27 @@ class ZF
                 $this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
                 $this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
             }
             }
         }
         }
-        
+
         return false;
         return false;
     }
     }
-    
+
 
 
     /**
     /**
      * _setupPHPRuntime() - parse the config file if it exists for php ini values to set
      * _setupPHPRuntime() - parse the config file if it exists for php ini values to set
-     * 
+     *
      * @return void
      * @return void
      */
      */
     protected function _setupPHPRuntime()
     protected function _setupPHPRuntime()
     {
     {
         // set php runtime settings
         // set php runtime settings
         ini_set('display_errors', true);
         ini_set('display_errors', true);
-        
+
         // support the changing of the current working directory, necessary for some providers
         // support the changing of the current working directory, necessary for some providers
         $cwd = getenv('ZEND_TOOL_CURRENT_WORKING_DIRECTORY');
         $cwd = getenv('ZEND_TOOL_CURRENT_WORKING_DIRECTORY');
         if ($cwd != '' && realpath($cwd)) {
         if ($cwd != '' && realpath($cwd)) {
             chdir($cwd);
             chdir($cwd);
         }
         }
-        
+
         if (!$this->_configFile) {
         if (!$this->_configFile) {
             return;
             return;
         }
         }
@@ -318,18 +318,18 @@ class ZF
         $phpINISettings = ini_get_all();
         $phpINISettings = ini_get_all();
         foreach ($zfINISettings as $zfINIKey => $zfINIValue) {
         foreach ($zfINISettings as $zfINIKey => $zfINIValue) {
             if (substr($zfINIKey, 0, 4) === 'php.') {
             if (substr($zfINIKey, 0, 4) === 'php.') {
-                $phpINIKey = substr($zfINIKey, 4); 
+                $phpINIKey = substr($zfINIKey, 4);
                 if (array_key_exists($phpINIKey, $phpINISettings)) {
                 if (array_key_exists($phpINIKey, $phpINISettings)) {
                     ini_set($phpINIKey, $zfINIValue);
                     ini_set($phpINIKey, $zfINIValue);
                 }
                 }
             }
             }
         }
         }
     }
     }
-    
+
     /**
     /**
      * _setupToolRuntime() - setup the tools include_path and load the proper framwork parts that
      * _setupToolRuntime() - setup the tools include_path and load the proper framwork parts that
      * enable Zend_Tool to work.
      * enable Zend_Tool to work.
-     * 
+     *
      * @return void
      * @return void
      */
      */
     protected function _setupToolRuntime()
     protected function _setupToolRuntime()
@@ -337,14 +337,14 @@ class ZF
 
 
         $includePathPrepend = getenv('ZEND_TOOL_INCLUDE_PATH_PREPEND');
         $includePathPrepend = getenv('ZEND_TOOL_INCLUDE_PATH_PREPEND');
         $includePathFull = getenv('ZEND_TOOL_INCLUDE_PATH');
         $includePathFull = getenv('ZEND_TOOL_INCLUDE_PATH');
-        
+
         // check if the user has not provided anything
         // check if the user has not provided anything
         if (!($includePathPrepend || $includePathFull)) {
         if (!($includePathPrepend || $includePathFull)) {
             if ($this->_tryClientLoad()) {
             if ($this->_tryClientLoad()) {
                 return;
                 return;
             }
             }
         }
         }
-        
+
         // if ZF is not in the include_path, but relative to this file, put it in the include_path
         // if ZF is not in the include_path, but relative to this file, put it in the include_path
         if ($includePathPrepend || $includePathFull) {
         if ($includePathPrepend || $includePathFull) {
             if (isset($includePathPrepend) && ($includePathPrepend !== false)) {
             if (isset($includePathPrepend) && ($includePathPrepend !== false)) {
@@ -353,28 +353,28 @@ class ZF
                 set_include_path($includePathFull);
                 set_include_path($includePathFull);
             }
             }
         }
         }
-        
+
         if ($this->_tryClientLoad()) {
         if ($this->_tryClientLoad()) {
             return;
             return;
         }
         }
-        
+
         $zfIncludePath['relativePath'] = dirname(__FILE__) . '/../library/';
         $zfIncludePath['relativePath'] = dirname(__FILE__) . '/../library/';
         if (file_exists($zfIncludePath['relativePath'] . 'Zend/Tool/Framework/Client/Console.php')) {
         if (file_exists($zfIncludePath['relativePath'] . 'Zend/Tool/Framework/Client/Console.php')) {
             set_include_path(realpath($zfIncludePath['relativePath']) . PATH_SEPARATOR . get_include_path());
             set_include_path(realpath($zfIncludePath['relativePath']) . PATH_SEPARATOR . get_include_path());
         }
         }
-    
+
         if (!$this->_tryClientLoad()) {
         if (!$this->_tryClientLoad()) {
             $this->_mode = 'runError';
             $this->_mode = 'runError';
             return;
             return;
         }
         }
     }
     }
-    
+
     /**
     /**
      * _tryClientLoad() - Attempt to load the Zend_Tool_Framework_Client_Console to enable the tool to run.
      * _tryClientLoad() - Attempt to load the Zend_Tool_Framework_Client_Console to enable the tool to run.
-     * 
+     *
      * This method will return false if its not loaded to allow the consumer to alter the environment in such
      * This method will return false if its not loaded to allow the consumer to alter the environment in such
      * a way that it can be called again to try loading the proper file/class.
      * a way that it can be called again to try loading the proper file/class.
-     * 
+     *
      * @return bool if the client is actuall loaded or not
      * @return bool if the client is actuall loaded or not
      */
      */
     protected function _tryClientLoad()
     protected function _tryClientLoad()
@@ -389,34 +389,34 @@ class ZF
             include 'Zend/Tool/Framework/Client/Console.php';
             include 'Zend/Tool/Framework/Client/Console.php';
             $this->_clientLoaded = class_exists('Zend_Tool_Framework_Client_Console');
             $this->_clientLoaded = class_exists('Zend_Tool_Framework_Client_Console');
         }
         }
-        
+
         return $this->_clientLoaded;
         return $this->_clientLoaded;
     }
     }
-    
+
     /**
     /**
      * _runError() - Output the error screen that tells the user that the tool was not setup
      * _runError() - Output the error screen that tells the user that the tool was not setup
      * in a sane way
      * in a sane way
-     * 
+     *
      * @return void
      * @return void
      */
      */
     protected function _runError()
     protected function _runError()
     {
     {
-        
+
         echo <<<EOS
         echo <<<EOS
-    
+
 ***************************** ZF ERROR ********************************
 ***************************** ZF ERROR ********************************
 In order to run the zf command, you need to ensure that Zend Framework
 In order to run the zf command, you need to ensure that Zend Framework
 is inside your include_path.  There are a variety of ways that you can
 is inside your include_path.  There are a variety of ways that you can
 ensure that this zf command line tool knows where the Zend Framework
 ensure that this zf command line tool knows where the Zend Framework
 library is on your system, but not all of them can be described here.
 library is on your system, but not all of them can be described here.
 
 
-The easiest way to get the zf command running is to give it the include 
-path via an environment variable ZEND_TOOL_INCLUDE_PATH or 
+The easiest way to get the zf command running is to give it the include
+path via an environment variable ZEND_TOOL_INCLUDE_PATH or
 ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
 ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
 then run the command "zf --setup".  This command is designed to create
 then run the command "zf --setup".  This command is designed to create
 a storage location for your user, as well as create the zf.ini file
 a storage location for your user, as well as create the zf.ini file
 that the zf command will consult in order to run properly on your
 that the zf command will consult in order to run properly on your
-system.  
+system.
 
 
 Example you would run:
 Example you would run:
 
 
@@ -427,38 +427,38 @@ Your are encourged to read more in the link that follows.
 EOS;
 EOS;
 
 
     }
     }
-    
+
     /**
     /**
      * _runInfo() - this command will produce information about the setup of this script and
      * _runInfo() - this command will produce information about the setup of this script and
      * Zend_Tool
      * Zend_Tool
-     * 
+     *
      * @return void
      * @return void
      */
      */
     protected function _runInfo()
     protected function _runInfo()
     {
     {
         echo 'Zend_Tool & CLI Setup Information' . PHP_EOL
         echo 'Zend_Tool & CLI Setup Information' . PHP_EOL
-           . '(available via the command line "zf --info")' 
+           . '(available via the command line "zf --info")'
            . PHP_EOL;
            . PHP_EOL;
-        
+
         echo '   * ' . implode(PHP_EOL . '   * ', $this->_messages) . PHP_EOL;
         echo '   * ' . implode(PHP_EOL . '   * ', $this->_messages) . PHP_EOL;
-        
+
         echo PHP_EOL;
         echo PHP_EOL;
-        
+
         echo 'To change the setup of this tool, run: "zf --setup"';
         echo 'To change the setup of this tool, run: "zf --setup"';
-           
+
         echo PHP_EOL;
         echo PHP_EOL;
 
 
     }
     }
-    
+
     /**
     /**
      * _runSetup() - parse the request to see which setup command to run
      * _runSetup() - parse the request to see which setup command to run
-     * 
+     *
      * @return void
      * @return void
      */
      */
     protected function _runSetup()
     protected function _runSetup()
     {
     {
         $setupCommand = (isset($_SERVER['argv'][2])) ? $_SERVER['argv'][2] : null;
         $setupCommand = (isset($_SERVER['argv'][2])) ? $_SERVER['argv'][2] : null;
-        
+
         switch ($setupCommand) {
         switch ($setupCommand) {
             case 'storage-directory':
             case 'storage-directory':
                 $this->_runSetupStorageDirectory();
                 $this->_runSetupStorageDirectory();
@@ -474,58 +474,58 @@ EOS;
 
 
     /**
     /**
      * _runSetupStorageDirectory() - if the storage directory does not exist, create it
      * _runSetupStorageDirectory() - if the storage directory does not exist, create it
-     * 
+     *
      * @return void
      * @return void
      */
      */
     protected function _runSetupStorageDirectory()
     protected function _runSetupStorageDirectory()
     {
     {
         $storageDirectory = $this->_detectStorageDirectory(false, false);
         $storageDirectory = $this->_detectStorageDirectory(false, false);
-        
+
         if (file_exists($storageDirectory)) {
         if (file_exists($storageDirectory)) {
             echo 'Directory already exists at ' . $storageDirectory . PHP_EOL
             echo 'Directory already exists at ' . $storageDirectory . PHP_EOL
                . 'Cannot create storage directory.';
                . 'Cannot create storage directory.';
             return;
             return;
         }
         }
-        
+
         mkdir($storageDirectory);
         mkdir($storageDirectory);
-        
+
         echo 'Storage directory created at ' . $storageDirectory . PHP_EOL;
         echo 'Storage directory created at ' . $storageDirectory . PHP_EOL;
     }
     }
 
 
     /**
     /**
      * _runSetupConfigFile()
      * _runSetupConfigFile()
-     * 
+     *
      * @return void
      * @return void
      */
      */
     protected function _runSetupConfigFile()
     protected function _runSetupConfigFile()
     {
     {
         $configFile = $this->_detectConfigFile(false, false);
         $configFile = $this->_detectConfigFile(false, false);
-        
+
         if (file_exists($configFile)) {
         if (file_exists($configFile)) {
             echo 'File already exists at ' . $configFile . PHP_EOL
             echo 'File already exists at ' . $configFile . PHP_EOL
                . 'Cannot write new config file.';
                . 'Cannot write new config file.';
             return;
             return;
         }
         }
-        
+
         $includePath = get_include_path();
         $includePath = get_include_path();
-        
+
         $contents = 'php.include_path = "' . $includePath . '"';
         $contents = 'php.include_path = "' . $includePath . '"';
-        
+
         file_put_contents($configFile, $contents);
         file_put_contents($configFile, $contents);
-        
+
         $iniValues = ini_get_all();
         $iniValues = ini_get_all();
         if ($iniValues['include_path']['global_value'] != $iniValues['include_path']['local_value']) {
         if ($iniValues['include_path']['global_value'] != $iniValues['include_path']['local_value']) {
             echo 'NOTE: the php include_path to be used with the tool has been written' . PHP_EOL
             echo 'NOTE: the php include_path to be used with the tool has been written' . PHP_EOL
-               . 'to the config file, using ZF_INCLUDE_PATH (or other include_path setters)' . PHP_EOL
+               . 'to the config file, using ZEND_TOOL_INCLUDE_PATH (or other include_path setters)' . PHP_EOL
                . 'is no longer necessary.' . PHP_EOL . PHP_EOL;
                . 'is no longer necessary.' . PHP_EOL . PHP_EOL;
         }
         }
-        
+
         echo 'Config file written to ' . $configFile . PHP_EOL;
         echo 'Config file written to ' . $configFile . PHP_EOL;
     }
     }
 
 
     /**
     /**
      * _runSetupMoreInfo() - return more information about what can be setup, and what is setup
      * _runSetupMoreInfo() - return more information about what can be setup, and what is setup
-     * 
+     *
      * @return void
      * @return void
      */
      */
     protected function _runSetupMoreInfo()
     protected function _runSetupMoreInfo()
@@ -533,31 +533,31 @@ EOS;
         $homeDirectory    = $this->_detectHomeDirectory(false, false);
         $homeDirectory    = $this->_detectHomeDirectory(false, false);
         $storageDirectory = $this->_detectStorageDirectory(false, false);
         $storageDirectory = $this->_detectStorageDirectory(false, false);
         $configFile       = $this->_detectConfigFile(false, false);
         $configFile       = $this->_detectConfigFile(false, false);
-        
+
         echo <<<EOS
         echo <<<EOS
 
 
 ZF Command Line Tool - Setup
 ZF Command Line Tool - Setup
 ----------------------------
 ----------------------------
-        
+
 Current Paths (Existing or not):
 Current Paths (Existing or not):
     Home Directory: {$homeDirectory}
     Home Directory: {$homeDirectory}
     Storage Directory: {$storageDirectory}
     Storage Directory: {$storageDirectory}
     Config File: {$configFile}
     Config File: {$configFile}
 
 
 Important Environment Variables:
 Important Environment Variables:
-    ZF_HOME 
+    ZF_HOME
         - the directory this tool will look for a home directory
         - the directory this tool will look for a home directory
         - directory must exist
         - directory must exist
-    ZF_STORAGE_DIRECTORY 
+    ZF_STORAGE_DIR
         - where this tool will look for a storage directory
         - where this tool will look for a storage directory
         - directory must exist
         - directory must exist
-    ZF_CONFIG_FILE 
+    ZF_CONFIG_FILE
         - where this tool will look for a configuration file
         - where this tool will look for a configuration file
-    ZF_INCLUDE_PATH
+    ZF_TOOL_INCLUDE_PATH
         - set the include_path for this tool to use this value
         - set the include_path for this tool to use this value
-    ZF_INCLUDE_PATH_PREPEND
+    ZF_TOOL_INCLUDE_PATH_PREPEND
         - prepend the current php.ini include_path with this value
         - prepend the current php.ini include_path with this value
-    
+
 Search Order:
 Search Order:
     Home Directory:
     Home Directory:
         - ZF_HOME, then HOME (*nix), then HOMEPATH (windows)
         - ZF_HOME, then HOME (*nix), then HOMEPATH (windows)
@@ -576,15 +576,15 @@ Commands:
 
 
 EOS;
 EOS;
     }
     }
-    
+
     /**
     /**
      * _runTool() - This is where the magic happens, dispatch Zend_Tool
      * _runTool() - This is where the magic happens, dispatch Zend_Tool
-     * 
+     *
      * @return void
      * @return void
      */
      */
     protected function _runTool()
     protected function _runTool()
     {
     {
-        
+
         $configOptions = array();
         $configOptions = array();
         if (isset($this->_configFile) && $this->_configFile) {
         if (isset($this->_configFile) && $this->_configFile) {
             $configOptions['configOptions']['configFilepath'] = $this->_configFile;
             $configOptions['configOptions']['configFilepath'] = $this->_configFile;
@@ -592,17 +592,17 @@ EOS;
         if (isset($this->_storageDirectory) && $this->_storageDirectory) {
         if (isset($this->_storageDirectory) && $this->_storageDirectory) {
             $configOptions['storageOptions']['directory'] = $this->_storageDirectory;
             $configOptions['storageOptions']['directory'] = $this->_storageDirectory;
         }
         }
-        
+
         // ensure that zf.php loads the Zend_Tool_Project features
         // ensure that zf.php loads the Zend_Tool_Project features
         $configOptions['classesToLoad'] = 'Zend_Tool_Project_Provider_Manifest';
         $configOptions['classesToLoad'] = 'Zend_Tool_Project_Provider_Manifest';
-        
+
         $console = new Zend_Tool_Framework_Client_Console($configOptions);
         $console = new Zend_Tool_Framework_Client_Console($configOptions);
         $console->dispatch();
         $console->dispatch();
     }
     }
 
 
     /**
     /**
      * _logMessage() - Internal method used to log setup and information messages.
      * _logMessage() - Internal method used to log setup and information messages.
-     * 
+     *
      * @param string $message
      * @param string $message
      * @param bool   $storeMessage
      * @param bool   $storeMessage
      * @return void
      * @return void
@@ -612,11 +612,11 @@ EOS;
         if (!$storeMessage) {
         if (!$storeMessage) {
             return;
             return;
         }
         }
-        
+
         $this->_messages[] = $message;
         $this->_messages[] = $message;
     }
     }
-    
-    
+
+
 }
 }
 
 
 if (!getenv('ZF_NO_MAIN')) {
 if (!getenv('ZF_NO_MAIN')) {

+ 4 - 4
documentation/manual/en/module_specs/Zend_Tool-Usage-CLI.xml

@@ -82,7 +82,7 @@ pear install zfcampus/zf
                 on your system. These options revolve around setting specific environment
                 on your system. These options revolve around setting specific environment
                 variables. These are described in the later section on "customizing the CLI
                 variables. These are described in the later section on "customizing the CLI
                 environement". The environment variables for setting the zf.php include_path,
                 environement". The environment variables for setting the zf.php include_path,
-                ZF_INCLUDE_PATH and ZF_INCLUDE_PATH_PREPEND, are the ones of most interest.
+                ZEND_TOOL_INCLUDE_PATH and ZF_TOOL_INCLUDE_PATH_PREPEND, are the ones of most interest.
             </para>
             </para>
         </sect3>
         </sect3>
     </sect2>
     </sect2>
@@ -551,7 +551,7 @@ zf --setup config-file
                 </listitem>
                 </listitem>
 
 
                 <listitem>
                 <listitem>
-                    <para>ZF_INCLUDE_PATH</para>
+                    <para>ZEND_TOOL_INCLUDE_PATH</para>
 
 
                     <itemizedlist>
                     <itemizedlist>
                         <listitem>
                         <listitem>
@@ -569,7 +569,7 @@ zf --setup config-file
                                 </listitem>
                                 </listitem>
 
 
                                 <listitem>
                                 <listitem>
-                                    <para>use the ZF_INCLUDE_PATH environment variable</para>
+                                    <para>use the ZEND_TOOL_INCLUDE_PATH environment variable</para>
                                 </listitem>
                                 </listitem>
 
 
                                 <listitem>
                                 <listitem>
@@ -583,7 +583,7 @@ zf --setup config-file
                 </listitem>
                 </listitem>
 
 
                 <listitem>
                 <listitem>
-                    <para>ZF_INCLUDE_PATH_PREPEND</para>
+                    <para>ZF_TOOL_INCLUDE_PATH_PREPEND</para>
 
 
                     <itemizedlist>
                     <itemizedlist>
                         <listitem>
                         <listitem>