--- a/web/lib/Zend/Tool/Project/Provider/Abstract.php Thu Mar 21 17:31:31 2013 +0100
+++ b/web/lib/Zend/Tool/Project/Provider/Abstract.php Thu Mar 21 19:50:53 2013 +0100
@@ -15,9 +15,9 @@
* @category Zend
* @package Zend_Tool
* @subpackage Framework
- * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 23202 2010-10-21 15:08:15Z ralph $
+ * @version $Id: Abstract.php 24593 2012-01-05 20:35:02Z matthew $
*/
/**
@@ -50,7 +50,7 @@
/**
* @category Zend
* @package Zend_Tool
- * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Tool_Project_Provider_Abstract
@@ -77,7 +77,7 @@
{
// initialize the ZF Contexts (only once per php request)
if (!self::$_isInitialized) {
-
+
// load all base contexts ONCE
$contextRegistry = Zend_Tool_Project_Context_Repository::getInstance();
$contextRegistry->addContextsFromDirectory(
@@ -86,7 +86,7 @@
$contextRegistry->addContextsFromDirectory(
dirname(dirname(__FILE__)) . '/Context/Filesystem/', 'Zend_Tool_Project_Context_Filesystem_'
);
-
+
// determine if there are project specfic providers ONCE
$profilePath = $this->_findProfileDirectory();
if ($this->_hasProjectProviderDirectory($profilePath . DIRECTORY_SEPARATOR . '.zfproject.xml')) {
@@ -95,7 +95,7 @@
$ppd = $profile->search('ProjectProvidersDirectory');
$ppd->loadProviders($this->_registry);
}
-
+
self::$_isInitialized = true;
}
@@ -118,9 +118,9 @@
* - if an enpoint variable has been registered in teh client registry - key=workingDirectory
* - if an ENV variable with the key ZFPROJECT_PATH is found
*
- * @param $loadProfileFlag bool Whether or not to throw an exception when no profile is found
- * @param $projectDirectory string The project directory to use to search
- * @param $searchParentDirectories bool Whether or not to search upper level direcotries
+ * @param bool $loadProfileFlag Whether or not to throw an exception when no profile is found
+ * @param string $projectDirectory The project directory to use to search
+ * @param bool $searchParentDirectories Whether or not to search upper level direcotries
* @return Zend_Tool_Project_Profile
*/
protected function _loadProfile($loadProfileFlag = self::NO_PROFILE_THROW_EXCEPTION, $projectDirectory = null, $searchParentDirectories = true)
@@ -134,14 +134,14 @@
return false;
}
}
-
+
$profile = new Zend_Tool_Project_Profile();
$profile->setAttribute('projectDirectory', $foundPath);
$profile->loadFromFile();
$this->_loadedProfile = $profile;
return $profile;
}
-
+
protected function _findProfileDirectory($projectDirectory = null, $searchParentDirectories = true)
{
// use the cwd if no directory was provided
@@ -166,7 +166,7 @@
unset($profile);
return $projectDirectoryAssembled;
}
-
+
// break after first run if we are not to check upper directories
if ($searchParentDirectories == false) {
break;
@@ -174,10 +174,10 @@
array_pop($parentDirectoriesArray);
}
-
+
return false;
}
-
+
/**
* Load the project profile from the current working directory, if not throw exception
*
@@ -248,19 +248,19 @@
if (!file_exists($pathToProfileFile)) {
return false;
}
-
+
$contents = file_get_contents($pathToProfileFile);
if (strstr($contents, '<projectProvidersDirectory') === false) {
return false;
}
-
+
if (strstr($contents, '<projectProvidersDirectory enabled="false"')) {
return false;
}
-
+
return true;
}
-
+
/**
* _loadContextClassesIntoRegistry() - This is called by the constructor
* so that child providers can provide a list of contexts to load into the