From 4d6165a6c62796be2c30d0f83e45925cd418fa17 Mon Sep 17 00:00:00 2001 From: Rafael Dohms Date: Mon, 27 Dec 2010 15:15:33 -0200 Subject: [PATCH] Removing .svn --- library/vendor/Zend/Loader/.svn/all-wcprops | 23 - library/vendor/Zend/Loader/.svn/entries | 136 ---- .../.svn/prop-base/Autoloader.php.svn-base | 9 - .../.svn/prop-base/Exception.php.svn-base | 5 - .../.svn/prop-base/PluginLoader.php.svn-base | 5 - .../.svn/text-base/Autoloader.php.svn-base | 582 ------------------ .../.svn/text-base/Exception.php.svn-base | 35 -- .../.svn/text-base/PluginLoader.php.svn-base | 484 --------------- .../Zend/Loader/Autoloader/.svn/all-wcprops | 17 - .../Zend/Loader/Autoloader/.svn/dir-prop-base | 5 - .../Zend/Loader/Autoloader/.svn/entries | 96 --- .../.svn/prop-base/Interface.php.svn-base | 5 - .../.svn/prop-base/Resource.php.svn-base | 5 - .../.svn/text-base/Interface.php.svn-base | 43 -- .../.svn/text-base/Resource.php.svn-base | 460 -------------- .../Zend/Loader/PluginLoader/.svn/all-wcprops | 17 - .../Zend/Loader/PluginLoader/.svn/entries | 96 --- .../.svn/prop-base/Exception.php.svn-base | 5 - .../.svn/prop-base/Interface.php.svn-base | 5 - .../.svn/text-base/Exception.php.svn-base | 39 -- .../.svn/text-base/Interface.php.svn-base | 75 --- 21 files changed, 2147 deletions(-) delete mode 100644 library/vendor/Zend/Loader/.svn/all-wcprops delete mode 100644 library/vendor/Zend/Loader/.svn/entries delete mode 100644 library/vendor/Zend/Loader/.svn/prop-base/Autoloader.php.svn-base delete mode 100644 library/vendor/Zend/Loader/.svn/prop-base/Exception.php.svn-base delete mode 100644 library/vendor/Zend/Loader/.svn/prop-base/PluginLoader.php.svn-base delete mode 100644 library/vendor/Zend/Loader/.svn/text-base/Autoloader.php.svn-base delete mode 100644 library/vendor/Zend/Loader/.svn/text-base/Exception.php.svn-base delete mode 100644 library/vendor/Zend/Loader/.svn/text-base/PluginLoader.php.svn-base delete mode 100644 library/vendor/Zend/Loader/Autoloader/.svn/all-wcprops delete mode 100644 library/vendor/Zend/Loader/Autoloader/.svn/dir-prop-base delete mode 100644 library/vendor/Zend/Loader/Autoloader/.svn/entries delete mode 100644 library/vendor/Zend/Loader/Autoloader/.svn/prop-base/Interface.php.svn-base delete mode 100644 library/vendor/Zend/Loader/Autoloader/.svn/prop-base/Resource.php.svn-base delete mode 100644 library/vendor/Zend/Loader/Autoloader/.svn/text-base/Interface.php.svn-base delete mode 100644 library/vendor/Zend/Loader/Autoloader/.svn/text-base/Resource.php.svn-base delete mode 100644 library/vendor/Zend/Loader/PluginLoader/.svn/all-wcprops delete mode 100644 library/vendor/Zend/Loader/PluginLoader/.svn/entries delete mode 100644 library/vendor/Zend/Loader/PluginLoader/.svn/prop-base/Exception.php.svn-base delete mode 100644 library/vendor/Zend/Loader/PluginLoader/.svn/prop-base/Interface.php.svn-base delete mode 100644 library/vendor/Zend/Loader/PluginLoader/.svn/text-base/Exception.php.svn-base delete mode 100644 library/vendor/Zend/Loader/PluginLoader/.svn/text-base/Interface.php.svn-base diff --git a/library/vendor/Zend/Loader/.svn/all-wcprops b/library/vendor/Zend/Loader/.svn/all-wcprops deleted file mode 100644 index bab2630..0000000 --- a/library/vendor/Zend/Loader/.svn/all-wcprops +++ /dev/null @@ -1,23 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 78 -/svn/framework/!svn/ver/23461/standard/tags/release-1.11.1/library/Zend/Loader -END -Exception.php -K 25 -svn:wc:ra_dav:version-url -V 92 -/svn/framework/!svn/ver/23461/standard/tags/release-1.11.1/library/Zend/Loader/Exception.php -END -Autoloader.php -K 25 -svn:wc:ra_dav:version-url -V 93 -/svn/framework/!svn/ver/23461/standard/tags/release-1.11.1/library/Zend/Loader/Autoloader.php -END -PluginLoader.php -K 25 -svn:wc:ra_dav:version-url -V 95 -/svn/framework/!svn/ver/23461/standard/tags/release-1.11.1/library/Zend/Loader/PluginLoader.php -END diff --git a/library/vendor/Zend/Loader/.svn/entries b/library/vendor/Zend/Loader/.svn/entries deleted file mode 100644 index 32a8262..0000000 --- a/library/vendor/Zend/Loader/.svn/entries +++ /dev/null @@ -1,136 +0,0 @@ -10 - -dir -23572 -http://framework.zend.com/svn/framework/standard/tags/release-1.11.1/library/Zend/Loader -http://framework.zend.com/svn/framework - - - -2010-10-19T16:08:36.011979Z -23161 -matthew - - - - - - - - - - - - - - -44c647ce-9c0f-0410-b52a-842ac1e357ba - -Autoloader -dir - -Exception.php -file - - - - -2010-12-03T16:16:50.000000Z -8d0304f03525e2a455025fce1f9fc275 -2010-01-06T02:05:09.675189Z -20096 -bkarwin -has-props - - - - - - - - - - - - - - - - - - - - -1121 - -Autoloader.php -file - - - - -2010-12-03T16:16:50.000000Z -cc3fab7dfe4cfc92ccd72db5af5376f5 -2010-10-19T16:08:36.011979Z -23161 -matthew -has-props - - - - - - - - - - - - - - - - - - - - -16617 - -PluginLoader -dir - -PluginLoader.php -file - - - - -2010-12-03T16:16:50.000000Z -ea38f3c5f1b86db73dd97dc1d51e1df5 -2010-07-17T00:02:10.590647Z -22603 -ramon -has-props - - - - - - - - - - - - - - - - - - - - -14749 - diff --git a/library/vendor/Zend/Loader/.svn/prop-base/Autoloader.php.svn-base b/library/vendor/Zend/Loader/.svn/prop-base/Autoloader.php.svn-base deleted file mode 100644 index 9c8eee9..0000000 --- a/library/vendor/Zend/Loader/.svn/prop-base/Autoloader.php.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -K 12 -svn:keywords -V 18 -Id Author Date Rev -K 13 -svn:mergeinfo -V 0 - -END diff --git a/library/vendor/Zend/Loader/.svn/prop-base/Exception.php.svn-base b/library/vendor/Zend/Loader/.svn/prop-base/Exception.php.svn-base deleted file mode 100644 index 92c8ad7..0000000 --- a/library/vendor/Zend/Loader/.svn/prop-base/Exception.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 12 -svn:keywords -V 2 -Id -END diff --git a/library/vendor/Zend/Loader/.svn/prop-base/PluginLoader.php.svn-base b/library/vendor/Zend/Loader/.svn/prop-base/PluginLoader.php.svn-base deleted file mode 100644 index 92c8ad7..0000000 --- a/library/vendor/Zend/Loader/.svn/prop-base/PluginLoader.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 12 -svn:keywords -V 2 -Id -END diff --git a/library/vendor/Zend/Loader/.svn/text-base/Autoloader.php.svn-base b/library/vendor/Zend/Loader/.svn/text-base/Autoloader.php.svn-base deleted file mode 100644 index a8a960d..0000000 --- a/library/vendor/Zend/Loader/.svn/text-base/Autoloader.php.svn-base +++ /dev/null @@ -1,582 +0,0 @@ - true, - 'ZendX_' => true, - ); - - /** - * @var array Namespace-specific autoloaders - */ - protected $_namespaceAutoloaders = array(); - - /** - * @var bool Whether or not to suppress file not found warnings - */ - protected $_suppressNotFoundWarnings = false; - - /** - * @var null|string - */ - protected $_zfPath; - - /** - * Retrieve singleton instance - * - * @return Zend_Loader_Autoloader - */ - public static function getInstance() - { - if (null === self::$_instance) { - self::$_instance = new self(); - } - return self::$_instance; - } - - /** - * Reset the singleton instance - * - * @return void - */ - public static function resetInstance() - { - self::$_instance = null; - } - - /** - * Autoload a class - * - * @param string $class - * @return bool - */ - public static function autoload($class) - { - $self = self::getInstance(); - - foreach ($self->getClassAutoloaders($class) as $autoloader) { - if ($autoloader instanceof Zend_Loader_Autoloader_Interface) { - if ($autoloader->autoload($class)) { - return true; - } - } elseif (is_array($autoloader)) { - if (call_user_func($autoloader, $class)) { - return true; - } - } elseif (is_string($autoloader) || is_callable($autoloader)) { - if ($autoloader($class)) { - return true; - } - } - } - - return false; - } - - /** - * Set the default autoloader implementation - * - * @param string|array $callback PHP callback - * @return void - */ - public function setDefaultAutoloader($callback) - { - if (!is_callable($callback)) { - throw new Zend_Loader_Exception('Invalid callback specified for default autoloader'); - } - - $this->_defaultAutoloader = $callback; - return $this; - } - - /** - * Retrieve the default autoloader callback - * - * @return string|array PHP Callback - */ - public function getDefaultAutoloader() - { - return $this->_defaultAutoloader; - } - - /** - * Set several autoloader callbacks at once - * - * @param array $autoloaders Array of PHP callbacks (or Zend_Loader_Autoloader_Interface implementations) to act as autoloaders - * @return Zend_Loader_Autoloader - */ - public function setAutoloaders(array $autoloaders) - { - $this->_autoloaders = $autoloaders; - return $this; - } - - /** - * Get attached autoloader implementations - * - * @return array - */ - public function getAutoloaders() - { - return $this->_autoloaders; - } - - /** - * Return all autoloaders for a given namespace - * - * @param string $namespace - * @return array - */ - public function getNamespaceAutoloaders($namespace) - { - $namespace = (string) $namespace; - if (!array_key_exists($namespace, $this->_namespaceAutoloaders)) { - return array(); - } - return $this->_namespaceAutoloaders[$namespace]; - } - - /** - * Register a namespace to autoload - * - * @param string|array $namespace - * @return Zend_Loader_Autoloader - */ - public function registerNamespace($namespace) - { - if (is_string($namespace)) { - $namespace = (array) $namespace; - } elseif (!is_array($namespace)) { - throw new Zend_Loader_Exception('Invalid namespace provided'); - } - - foreach ($namespace as $ns) { - if (!isset($this->_namespaces[$ns])) { - $this->_namespaces[$ns] = true; - } - } - return $this; - } - - /** - * Unload a registered autoload namespace - * - * @param string|array $namespace - * @return Zend_Loader_Autoloader - */ - public function unregisterNamespace($namespace) - { - if (is_string($namespace)) { - $namespace = (array) $namespace; - } elseif (!is_array($namespace)) { - throw new Zend_Loader_Exception('Invalid namespace provided'); - } - - foreach ($namespace as $ns) { - if (isset($this->_namespaces[$ns])) { - unset($this->_namespaces[$ns]); - } - } - return $this; - } - - /** - * Get a list of registered autoload namespaces - * - * @return array - */ - public function getRegisteredNamespaces() - { - return array_keys($this->_namespaces); - } - - public function setZfPath($spec, $version = 'latest') - { - $path = $spec; - if (is_array($spec)) { - if (!isset($spec['path'])) { - throw new Zend_Loader_Exception('No path specified for ZF'); - } - $path = $spec['path']; - if (isset($spec['version'])) { - $version = $spec['version']; - } - } - - $this->_zfPath = $this->_getVersionPath($path, $version); - set_include_path(implode(PATH_SEPARATOR, array( - $this->_zfPath, - get_include_path(), - ))); - return $this; - } - - public function getZfPath() - { - return $this->_zfPath; - } - - /** - * Get or set the value of the "suppress not found warnings" flag - * - * @param null|bool $flag - * @return bool|Zend_Loader_Autoloader Returns boolean if no argument is passed, object instance otherwise - */ - public function suppressNotFoundWarnings($flag = null) - { - if (null === $flag) { - return $this->_suppressNotFoundWarnings; - } - $this->_suppressNotFoundWarnings = (bool) $flag; - return $this; - } - - /** - * Indicate whether or not this autoloader should be a fallback autoloader - * - * @param bool $flag - * @return Zend_Loader_Autoloader - */ - public function setFallbackAutoloader($flag) - { - $this->_fallbackAutoloader = (bool) $flag; - return $this; - } - - /** - * Is this instance acting as a fallback autoloader? - * - * @return bool - */ - public function isFallbackAutoloader() - { - return $this->_fallbackAutoloader; - } - - /** - * Get autoloaders to use when matching class - * - * Determines if the class matches a registered namespace, and, if so, - * returns only the autoloaders for that namespace. Otherwise, it returns - * all non-namespaced autoloaders. - * - * @param string $class - * @return array Array of autoloaders to use - */ - public function getClassAutoloaders($class) - { - $namespace = false; - $autoloaders = array(); - - // Add concrete namespaced autoloaders - foreach (array_keys($this->_namespaceAutoloaders) as $ns) { - if ('' == $ns) { - continue; - } - if (0 === strpos($class, $ns)) { - $namespace = $ns; - $autoloaders = $autoloaders + $this->getNamespaceAutoloaders($ns); - break; - } - } - - // Add internal namespaced autoloader - foreach ($this->getRegisteredNamespaces() as $ns) { - if (0 === strpos($class, $ns)) { - $namespace = $ns; - $autoloaders[] = $this->_internalAutoloader; - break; - } - } - - // Add non-namespaced autoloaders - $autoloaders = $autoloaders + $this->getNamespaceAutoloaders(''); - - // Add fallback autoloader - if (!$namespace && $this->isFallbackAutoloader()) { - $autoloaders[] = $this->_internalAutoloader; - } - - return $autoloaders; - } - - /** - * Add an autoloader to the beginning of the stack - * - * @param object|array|string $callback PHP callback or Zend_Loader_Autoloader_Interface implementation - * @param string|array $namespace Specific namespace(s) under which to register callback - * @return Zend_Loader_Autoloader - */ - public function unshiftAutoloader($callback, $namespace = '') - { - $autoloaders = $this->getAutoloaders(); - array_unshift($autoloaders, $callback); - $this->setAutoloaders($autoloaders); - - $namespace = (array) $namespace; - foreach ($namespace as $ns) { - $autoloaders = $this->getNamespaceAutoloaders($ns); - array_unshift($autoloaders, $callback); - $this->_setNamespaceAutoloaders($autoloaders, $ns); - } - - return $this; - } - - /** - * Append an autoloader to the autoloader stack - * - * @param object|array|string $callback PHP callback or Zend_Loader_Autoloader_Interface implementation - * @param string|array $namespace Specific namespace(s) under which to register callback - * @return Zend_Loader_Autoloader - */ - public function pushAutoloader($callback, $namespace = '') - { - $autoloaders = $this->getAutoloaders(); - array_push($autoloaders, $callback); - $this->setAutoloaders($autoloaders); - - $namespace = (array) $namespace; - foreach ($namespace as $ns) { - $autoloaders = $this->getNamespaceAutoloaders($ns); - array_push($autoloaders, $callback); - $this->_setNamespaceAutoloaders($autoloaders, $ns); - } - - return $this; - } - - /** - * Remove an autoloader from the autoloader stack - * - * @param object|array|string $callback PHP callback or Zend_Loader_Autoloader_Interface implementation - * @param null|string|array $namespace Specific namespace(s) from which to remove autoloader - * @return Zend_Loader_Autoloader - */ - public function removeAutoloader($callback, $namespace = null) - { - if (null === $namespace) { - $autoloaders = $this->getAutoloaders(); - if (false !== ($index = array_search($callback, $autoloaders, true))) { - unset($autoloaders[$index]); - $this->setAutoloaders($autoloaders); - } - - foreach ($this->_namespaceAutoloaders as $ns => $autoloaders) { - if (false !== ($index = array_search($callback, $autoloaders, true))) { - unset($autoloaders[$index]); - $this->_setNamespaceAutoloaders($autoloaders, $ns); - } - } - } else { - $namespace = (array) $namespace; - foreach ($namespace as $ns) { - $autoloaders = $this->getNamespaceAutoloaders($ns); - if (false !== ($index = array_search($callback, $autoloaders, true))) { - unset($autoloaders[$index]); - $this->_setNamespaceAutoloaders($autoloaders, $ns); - } - } - } - - return $this; - } - - /** - * Constructor - * - * Registers instance with spl_autoload stack - * - * @return void - */ - protected function __construct() - { - spl_autoload_register(array(__CLASS__, 'autoload')); - $this->_internalAutoloader = array($this, '_autoload'); - } - - /** - * Internal autoloader implementation - * - * @param string $class - * @return bool - */ - protected function _autoload($class) - { - $callback = $this->getDefaultAutoloader(); - try { - if ($this->suppressNotFoundWarnings()) { - @call_user_func($callback, $class); - } else { - call_user_func($callback, $class); - } - return $class; - } catch (Zend_Exception $e) { - return false; - } - } - - /** - * Set autoloaders for a specific namespace - * - * @param array $autoloaders - * @param string $namespace - * @return Zend_Loader_Autoloader - */ - protected function _setNamespaceAutoloaders(array $autoloaders, $namespace = '') - { - $namespace = (string) $namespace; - $this->_namespaceAutoloaders[$namespace] = $autoloaders; - return $this; - } - - /** - * Retrieve the filesystem path for the requested ZF version - * - * @param string $path - * @param string $version - * @return void - */ - protected function _getVersionPath($path, $version) - { - $type = $this->_getVersionType($version); - - if ($type == 'latest') { - $version = 'latest'; - } - - $availableVersions = $this->_getAvailableVersions($path, $version); - if (empty($availableVersions)) { - throw new Zend_Loader_Exception('No valid ZF installations discovered'); - } - - $matchedVersion = array_pop($availableVersions); - return $matchedVersion; - } - - /** - * Retrieve the ZF version type - * - * @param string $version - * @return string "latest", "major", "minor", or "specific" - * @throws Zend_Loader_Exception if version string contains too many dots - */ - protected function _getVersionType($version) - { - if (strtolower($version) == 'latest') { - return 'latest'; - } - - $parts = explode('.', $version); - $count = count($parts); - if (1 == $count) { - return 'major'; - } - if (2 == $count) { - return 'minor'; - } - if (3 < $count) { - throw new Zend_Loader_Exception('Invalid version string provided'); - } - return 'specific'; - } - - /** - * Get available versions for the version type requested - * - * @param string $path - * @param string $version - * @return array - */ - protected function _getAvailableVersions($path, $version) - { - if (!is_dir($path)) { - throw new Zend_Loader_Exception('Invalid ZF path provided'); - } - - $path = rtrim($path, '/'); - $path = rtrim($path, '\\'); - $versionLen = strlen($version); - $versions = array(); - $dirs = glob("$path/*", GLOB_ONLYDIR); - foreach ((array) $dirs as $dir) { - $dirName = substr($dir, strlen($path) + 1); - if (!preg_match('/^(?:ZendFramework-)?(\d+\.\d+\.\d+((a|b|pl|pr|p|rc)\d+)?)(?:-minimal)?$/i', $dirName, $matches)) { - continue; - } - - $matchedVersion = $matches[1]; - - if (('latest' == $version) - || ((strlen($matchedVersion) >= $versionLen) - && (0 === strpos($matchedVersion, $version))) - ) { - $versions[$matchedVersion] = $dir . '/library'; - } - } - - uksort($versions, 'version_compare'); - return $versions; - } -} diff --git a/library/vendor/Zend/Loader/.svn/text-base/Exception.php.svn-base b/library/vendor/Zend/Loader/.svn/text-base/Exception.php.svn-base deleted file mode 100644 index 10416a8..0000000 --- a/library/vendor/Zend/Loader/.svn/text-base/Exception.php.svn-base +++ /dev/null @@ -1,35 +0,0 @@ -_useStaticRegistry = $staticRegistryName; - if(!isset(self::$_staticPrefixToPaths[$staticRegistryName])) { - self::$_staticPrefixToPaths[$staticRegistryName] = array(); - } - if(!isset(self::$_staticLoadedPlugins[$staticRegistryName])) { - self::$_staticLoadedPlugins[$staticRegistryName] = array(); - } - } - - foreach ($prefixToPaths as $prefix => $path) { - $this->addPrefixPath($prefix, $path); - } - } - - /** - * Format prefix for internal use - * - * @param string $prefix - * @return string - */ - protected function _formatPrefix($prefix) - { - if($prefix == "") { - return $prefix; - } - - $last = strlen($prefix) - 1; - if ($prefix{$last} == '\\') { - return $prefix; - } - - return rtrim($prefix, '_') . '_'; - } - - /** - * Add prefixed paths to the registry of paths - * - * @param string $prefix - * @param string $path - * @return Zend_Loader_PluginLoader - */ - public function addPrefixPath($prefix, $path) - { - if (!is_string($prefix) || !is_string($path)) { - require_once 'Zend/Loader/PluginLoader/Exception.php'; - throw new Zend_Loader_PluginLoader_Exception('Zend_Loader_PluginLoader::addPrefixPath() method only takes strings for prefix and path.'); - } - - $prefix = $this->_formatPrefix($prefix); - $path = rtrim($path, '/\\') . '/'; - - if ($this->_useStaticRegistry) { - self::$_staticPrefixToPaths[$this->_useStaticRegistry][$prefix][] = $path; - } else { - if (!isset($this->_prefixToPaths[$prefix])) { - $this->_prefixToPaths[$prefix] = array(); - } - if (!in_array($path, $this->_prefixToPaths[$prefix])) { - $this->_prefixToPaths[$prefix][] = $path; - } - } - return $this; - } - - /** - * Get path stack - * - * @param string $prefix - * @return false|array False if prefix does not exist, array otherwise - */ - public function getPaths($prefix = null) - { - if ((null !== $prefix) && is_string($prefix)) { - $prefix = $this->_formatPrefix($prefix); - if ($this->_useStaticRegistry) { - if (isset(self::$_staticPrefixToPaths[$this->_useStaticRegistry][$prefix])) { - return self::$_staticPrefixToPaths[$this->_useStaticRegistry][$prefix]; - } - - return false; - } - - if (isset($this->_prefixToPaths[$prefix])) { - return $this->_prefixToPaths[$prefix]; - } - - return false; - } - - if ($this->_useStaticRegistry) { - return self::$_staticPrefixToPaths[$this->_useStaticRegistry]; - } - - return $this->_prefixToPaths; - } - - /** - * Clear path stack - * - * @param string $prefix - * @return bool False only if $prefix does not exist - */ - public function clearPaths($prefix = null) - { - if ((null !== $prefix) && is_string($prefix)) { - $prefix = $this->_formatPrefix($prefix); - if ($this->_useStaticRegistry) { - if (isset(self::$_staticPrefixToPaths[$this->_useStaticRegistry][$prefix])) { - unset(self::$_staticPrefixToPaths[$this->_useStaticRegistry][$prefix]); - return true; - } - - return false; - } - - if (isset($this->_prefixToPaths[$prefix])) { - unset($this->_prefixToPaths[$prefix]); - return true; - } - - return false; - } - - if ($this->_useStaticRegistry) { - self::$_staticPrefixToPaths[$this->_useStaticRegistry] = array(); - } else { - $this->_prefixToPaths = array(); - } - - return true; - } - - /** - * Remove a prefix (or prefixed-path) from the registry - * - * @param string $prefix - * @param string $path OPTIONAL - * @return Zend_Loader_PluginLoader - */ - public function removePrefixPath($prefix, $path = null) - { - $prefix = $this->_formatPrefix($prefix); - if ($this->_useStaticRegistry) { - $registry =& self::$_staticPrefixToPaths[$this->_useStaticRegistry]; - } else { - $registry =& $this->_prefixToPaths; - } - - if (!isset($registry[$prefix])) { - require_once 'Zend/Loader/PluginLoader/Exception.php'; - throw new Zend_Loader_PluginLoader_Exception('Prefix ' . $prefix . ' was not found in the PluginLoader.'); - } - - if ($path != null) { - $pos = array_search($path, $registry[$prefix]); - if (false === $pos) { - require_once 'Zend/Loader/PluginLoader/Exception.php'; - throw new Zend_Loader_PluginLoader_Exception('Prefix ' . $prefix . ' / Path ' . $path . ' was not found in the PluginLoader.'); - } - unset($registry[$prefix][$pos]); - } else { - unset($registry[$prefix]); - } - - return $this; - } - - /** - * Normalize plugin name - * - * @param string $name - * @return string - */ - protected function _formatName($name) - { - return ucfirst((string) $name); - } - - /** - * Whether or not a Plugin by a specific name is loaded - * - * @param string $name - * @return Zend_Loader_PluginLoader - */ - public function isLoaded($name) - { - $name = $this->_formatName($name); - if ($this->_useStaticRegistry) { - return isset(self::$_staticLoadedPlugins[$this->_useStaticRegistry][$name]); - } - - return isset($this->_loadedPlugins[$name]); - } - - /** - * Return full class name for a named plugin - * - * @param string $name - * @return string|false False if class not found, class name otherwise - */ - public function getClassName($name) - { - $name = $this->_formatName($name); - if ($this->_useStaticRegistry - && isset(self::$_staticLoadedPlugins[$this->_useStaticRegistry][$name]) - ) { - return self::$_staticLoadedPlugins[$this->_useStaticRegistry][$name]; - } elseif (isset($this->_loadedPlugins[$name])) { - return $this->_loadedPlugins[$name]; - } - - return false; - } - - /** - * Get path to plugin class - * - * @param mixed $name - * @return string|false False if not found - */ - public function getClassPath($name) - { - $name = $this->_formatName($name); - if ($this->_useStaticRegistry - && !empty(self::$_staticLoadedPluginPaths[$this->_useStaticRegistry][$name]) - ) { - return self::$_staticLoadedPluginPaths[$this->_useStaticRegistry][$name]; - } elseif (!empty($this->_loadedPluginPaths[$name])) { - return $this->_loadedPluginPaths[$name]; - } - - if ($this->isLoaded($name)) { - $class = $this->getClassName($name); - $r = new ReflectionClass($class); - $path = $r->getFileName(); - if ($this->_useStaticRegistry) { - self::$_staticLoadedPluginPaths[$this->_useStaticRegistry][$name] = $path; - } else { - $this->_loadedPluginPaths[$name] = $path; - } - return $path; - } - - return false; - } - - /** - * Load a plugin via the name provided - * - * @param string $name - * @param bool $throwExceptions Whether or not to throw exceptions if the - * class is not resolved - * @return string|false Class name of loaded class; false if $throwExceptions - * if false and no class found - * @throws Zend_Loader_Exception if class not found - */ - public function load($name, $throwExceptions = true) - { - $name = $this->_formatName($name); - if ($this->isLoaded($name)) { - return $this->getClassName($name); - } - - if ($this->_useStaticRegistry) { - $registry = self::$_staticPrefixToPaths[$this->_useStaticRegistry]; - } else { - $registry = $this->_prefixToPaths; - } - - $registry = array_reverse($registry, true); - $found = false; - $classFile = str_replace('_', DIRECTORY_SEPARATOR, $name) . '.php'; - $incFile = self::getIncludeFileCache(); - foreach ($registry as $prefix => $paths) { - $className = $prefix . $name; - - if (class_exists($className, false)) { - $found = true; - break; - } - - $paths = array_reverse($paths, true); - - foreach ($paths as $path) { - $loadFile = $path . $classFile; - if (Zend_Loader::isReadable($loadFile)) { - include_once $loadFile; - if (class_exists($className, false)) { - if (null !== $incFile) { - self::_appendIncFile($loadFile); - } - $found = true; - break 2; - } - } - } - } - - if (!$found) { - if (!$throwExceptions) { - return false; - } - - $message = "Plugin by name '$name' was not found in the registry; used paths:"; - foreach ($registry as $prefix => $paths) { - $message .= "\n$prefix: " . implode(PATH_SEPARATOR, $paths); - } - require_once 'Zend/Loader/PluginLoader/Exception.php'; - throw new Zend_Loader_PluginLoader_Exception($message); - } - - if ($this->_useStaticRegistry) { - self::$_staticLoadedPlugins[$this->_useStaticRegistry][$name] = $className; - } else { - $this->_loadedPlugins[$name] = $className; - } - return $className; - } - - /** - * Set path to class file cache - * - * Specify a path to a file that will add include_once statements for each - * plugin class loaded. This is an opt-in feature for performance purposes. - * - * @param string $file - * @return void - * @throws Zend_Loader_PluginLoader_Exception if file is not writeable or path does not exist - */ - public static function setIncludeFileCache($file) - { - if (null === $file) { - self::$_includeFileCache = null; - return; - } - - if (!file_exists($file) && !file_exists(dirname($file))) { - require_once 'Zend/Loader/PluginLoader/Exception.php'; - throw new Zend_Loader_PluginLoader_Exception('Specified file does not exist and/or directory does not exist (' . $file . ')'); - } - if (file_exists($file) && !is_writable($file)) { - require_once 'Zend/Loader/PluginLoader/Exception.php'; - throw new Zend_Loader_PluginLoader_Exception('Specified file is not writeable (' . $file . ')'); - } - if (!file_exists($file) && file_exists(dirname($file)) && !is_writable(dirname($file))) { - require_once 'Zend/Loader/PluginLoader/Exception.php'; - throw new Zend_Loader_PluginLoader_Exception('Specified file is not writeable (' . $file . ')'); - } - - self::$_includeFileCache = $file; - } - - /** - * Retrieve class file cache path - * - * @return string|null - */ - public static function getIncludeFileCache() - { - return self::$_includeFileCache; - } - - /** - * Append an include_once statement to the class file cache - * - * @param string $incFile - * @return void - */ - protected static function _appendIncFile($incFile) - { - if (!file_exists(self::$_includeFileCache)) { - $file = 'toArray(); - } - if (!is_array($options)) { - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception('Options must be passed to resource loader constructor'); - } - - $this->setOptions($options); - - $namespace = $this->getNamespace(); - if ((null === $namespace) - || (null === $this->getBasePath()) - ) { - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception('Resource loader requires both a namespace and a base path for initialization'); - } - - if (!empty($namespace)) { - $namespace .= '_'; - } - Zend_Loader_Autoloader::getInstance()->unshiftAutoloader($this, $namespace); - } - - /** - * Overloading: methods - * - * Allow retrieving concrete resource object instances using 'get()' - * syntax. Example: - * - * $loader = new Zend_Loader_Autoloader_Resource(array( - * 'namespace' => 'Stuff_', - * 'basePath' => '/path/to/some/stuff', - * )) - * $loader->addResourceType('Model', 'models', 'Model'); - * - * $foo = $loader->getModel('Foo'); // get instance of Stuff_Model_Foo class - * - * - * @param string $method - * @param array $args - * @return mixed - * @throws Zend_Loader_Exception if method not beginning with 'get' or not matching a valid resource type is called - */ - public function __call($method, $args) - { - if ('get' == substr($method, 0, 3)) { - $type = strtolower(substr($method, 3)); - if (!$this->hasResourceType($type)) { - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception("Invalid resource type $type; cannot load resource"); - } - if (empty($args)) { - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception("Cannot load resources; no resource specified"); - } - $resource = array_shift($args); - return $this->load($resource, $type); - } - - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception("Method '$method' is not supported"); - } - - /** - * Helper method to calculate the correct class path - * - * @param string $class - * @return False if not matched other wise the correct path - */ - public function getClassPath($class) - { - $segments = explode('_', $class); - $namespaceTopLevel = $this->getNamespace(); - $namespace = ''; - - if (!empty($namespaceTopLevel)) { - $namespace = array_shift($segments); - if ($namespace != $namespaceTopLevel) { - // wrong prefix? we're done - return false; - } - } - - if (count($segments) < 2) { - // assumes all resources have a component and class name, minimum - return false; - } - - $final = array_pop($segments); - $component = $namespace; - $lastMatch = false; - do { - $segment = array_shift($segments); - $component .= empty($component) ? $segment : '_' . $segment; - if (isset($this->_components[$component])) { - $lastMatch = $component; - } - } while (count($segments)); - - if (!$lastMatch) { - return false; - } - - $final = substr($class, strlen($lastMatch) + 1); - $path = $this->_components[$lastMatch]; - $classPath = $path . '/' . str_replace('_', '/', $final) . '.php'; - - if (Zend_Loader::isReadable($classPath)) { - return $classPath; - } - - return false; - } - - /** - * Attempt to autoload a class - * - * @param string $class - * @return mixed False if not matched, otherwise result if include operation - */ - public function autoload($class) - { - $classPath = $this->getClassPath($class); - if (false !== $classPath) { - return include $classPath; - } - return false; - } - - /** - * Set class state from options - * - * @param array $options - * @return Zend_Loader_Autoloader_Resource - */ - public function setOptions(array $options) - { - $methods = get_class_methods($this); - foreach ($options as $key => $value) { - $method = 'set' . ucfirst($key); - if (in_array($method, $methods)) { - $this->$method($value); - } - } - return $this; - } - - /** - * Set namespace that this autoloader handles - * - * @param string $namespace - * @return Zend_Loader_Autoloader_Resource - */ - public function setNamespace($namespace) - { - $this->_namespace = rtrim((string) $namespace, '_'); - return $this; - } - - /** - * Get namespace this autoloader handles - * - * @return string - */ - public function getNamespace() - { - return $this->_namespace; - } - - /** - * Set base path for this set of resources - * - * @param string $path - * @return Zend_Loader_Autoloader_Resource - */ - public function setBasePath($path) - { - $this->_basePath = (string) $path; - return $this; - } - - /** - * Get base path to this set of resources - * - * @return string - */ - public function getBasePath() - { - return $this->_basePath; - } - - /** - * Add resource type - * - * @param string $type identifier for the resource type being loaded - * @param string $path path relative to resource base path containing the resource types - * @param null|string $namespace sub-component namespace to append to base namespace that qualifies this resource type - * @return Zend_Loader_Autoloader_Resource - */ - public function addResourceType($type, $path, $namespace = null) - { - $type = strtolower($type); - if (!isset($this->_resourceTypes[$type])) { - if (null === $namespace) { - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception('Initial definition of a resource type must include a namespace'); - } - $namespaceTopLevel = $this->getNamespace(); - $namespace = ucfirst(trim($namespace, '_')); - $this->_resourceTypes[$type] = array( - 'namespace' => empty($namespaceTopLevel) ? $namespace : $namespaceTopLevel . '_' . $namespace, - ); - } - if (!is_string($path)) { - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception('Invalid path specification provided; must be string'); - } - $this->_resourceTypes[$type]['path'] = $this->getBasePath() . '/' . rtrim($path, '\/'); - - $component = $this->_resourceTypes[$type]['namespace']; - $this->_components[$component] = $this->_resourceTypes[$type]['path']; - return $this; - } - - /** - * Add multiple resources at once - * - * $types should be an associative array of resource type => specification - * pairs. Each specification should be an associative array containing - * minimally the 'path' key (specifying the path relative to the resource - * base path) and optionally the 'namespace' key (indicating the subcomponent - * namespace to append to the resource namespace). - * - * As an example: - * - * $loader->addResourceTypes(array( - * 'model' => array( - * 'path' => 'models', - * 'namespace' => 'Model', - * ), - * 'form' => array( - * 'path' => 'forms', - * 'namespace' => 'Form', - * ), - * )); - * - * - * @param array $types - * @return Zend_Loader_Autoloader_Resource - */ - public function addResourceTypes(array $types) - { - foreach ($types as $type => $spec) { - if (!is_array($spec)) { - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception('addResourceTypes() expects an array of arrays'); - } - if (!isset($spec['path'])) { - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception('addResourceTypes() expects each array to include a paths element'); - } - $paths = $spec['path']; - $namespace = null; - if (isset($spec['namespace'])) { - $namespace = $spec['namespace']; - } - $this->addResourceType($type, $paths, $namespace); - } - return $this; - } - - /** - * Overwrite existing and set multiple resource types at once - * - * @see Zend_Loader_Autoloader_Resource::addResourceTypes() - * @param array $types - * @return Zend_Loader_Autoloader_Resource - */ - public function setResourceTypes(array $types) - { - $this->clearResourceTypes(); - return $this->addResourceTypes($types); - } - - /** - * Retrieve resource type mappings - * - * @return array - */ - public function getResourceTypes() - { - return $this->_resourceTypes; - } - - /** - * Is the requested resource type defined? - * - * @param string $type - * @return bool - */ - public function hasResourceType($type) - { - return isset($this->_resourceTypes[$type]); - } - - /** - * Remove the requested resource type - * - * @param string $type - * @return Zend_Loader_Autoloader_Resource - */ - public function removeResourceType($type) - { - if ($this->hasResourceType($type)) { - $namespace = $this->_resourceTypes[$type]['namespace']; - unset($this->_components[$namespace]); - unset($this->_resourceTypes[$type]); - } - return $this; - } - - /** - * Clear all resource types - * - * @return Zend_Loader_Autoloader_Resource - */ - public function clearResourceTypes() - { - $this->_resourceTypes = array(); - $this->_components = array(); - return $this; - } - - /** - * Set default resource type to use when calling load() - * - * @param string $type - * @return Zend_Loader_Autoloader_Resource - */ - public function setDefaultResourceType($type) - { - if ($this->hasResourceType($type)) { - $this->_defaultResourceType = $type; - } - return $this; - } - - /** - * Get default resource type to use when calling load() - * - * @return string|null - */ - public function getDefaultResourceType() - { - return $this->_defaultResourceType; - } - - /** - * Object registry and factory - * - * Loads the requested resource of type $type (or uses the default resource - * type if none provided). If the resource has been loaded previously, - * returns the previous instance; otherwise, instantiates it. - * - * @param string $resource - * @param string $type - * @return object - * @throws Zend_Loader_Exception if resource type not specified or invalid - */ - public function load($resource, $type = null) - { - if (null === $type) { - $type = $this->getDefaultResourceType(); - if (empty($type)) { - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception('No resource type specified'); - } - } - if (!$this->hasResourceType($type)) { - require_once 'Zend/Loader/Exception.php'; - throw new Zend_Loader_Exception('Invalid resource type specified'); - } - $namespace = $this->_resourceTypes[$type]['namespace']; - $class = $namespace . '_' . ucfirst($resource); - if (!isset($this->_resources[$class])) { - $this->_resources[$class] = new $class; - } - return $this->_resources[$class]; - } -} diff --git a/library/vendor/Zend/Loader/PluginLoader/.svn/all-wcprops b/library/vendor/Zend/Loader/PluginLoader/.svn/all-wcprops deleted file mode 100644 index b2ac1a9..0000000 --- a/library/vendor/Zend/Loader/PluginLoader/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 91 -/svn/framework/!svn/ver/23461/standard/tags/release-1.11.1/library/Zend/Loader/PluginLoader -END -Exception.php -K 25 -svn:wc:ra_dav:version-url -V 105 -/svn/framework/!svn/ver/23461/standard/tags/release-1.11.1/library/Zend/Loader/PluginLoader/Exception.php -END -Interface.php -K 25 -svn:wc:ra_dav:version-url -V 105 -/svn/framework/!svn/ver/23461/standard/tags/release-1.11.1/library/Zend/Loader/PluginLoader/Interface.php -END diff --git a/library/vendor/Zend/Loader/PluginLoader/.svn/entries b/library/vendor/Zend/Loader/PluginLoader/.svn/entries deleted file mode 100644 index 138081b..0000000 --- a/library/vendor/Zend/Loader/PluginLoader/.svn/entries +++ /dev/null @@ -1,96 +0,0 @@ -10 - -dir -23572 -http://framework.zend.com/svn/framework/standard/tags/release-1.11.1/library/Zend/Loader/PluginLoader -http://framework.zend.com/svn/framework - - - -2010-01-06T02:05:09.675189Z -20096 -bkarwin - - - - - - - - - - - - - - -44c647ce-9c0f-0410-b52a-842ac1e357ba - -Exception.php -file - - - - -2010-12-03T16:16:50.000000Z -a4dbef362508f4eefd5871fd798ce309 -2010-01-06T02:05:09.675189Z -20096 -bkarwin -has-props - - - - - - - - - - - - - - - - - - - - -1220 - -Interface.php -file - - - - -2010-12-03T16:16:50.000000Z -f8d6ffad6844e41dd9b341db31c856ec -2010-01-06T02:05:09.675189Z -20096 -bkarwin -has-props - - - - - - - - - - - - - - - - - - - - -2073 - diff --git a/library/vendor/Zend/Loader/PluginLoader/.svn/prop-base/Exception.php.svn-base b/library/vendor/Zend/Loader/PluginLoader/.svn/prop-base/Exception.php.svn-base deleted file mode 100644 index 92c8ad7..0000000 --- a/library/vendor/Zend/Loader/PluginLoader/.svn/prop-base/Exception.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 12 -svn:keywords -V 2 -Id -END diff --git a/library/vendor/Zend/Loader/PluginLoader/.svn/prop-base/Interface.php.svn-base b/library/vendor/Zend/Loader/PluginLoader/.svn/prop-base/Interface.php.svn-base deleted file mode 100644 index 92c8ad7..0000000 --- a/library/vendor/Zend/Loader/PluginLoader/.svn/prop-base/Interface.php.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 12 -svn:keywords -V 2 -Id -END diff --git a/library/vendor/Zend/Loader/PluginLoader/.svn/text-base/Exception.php.svn-base b/library/vendor/Zend/Loader/PluginLoader/.svn/text-base/Exception.php.svn-base deleted file mode 100644 index 4597acb..0000000 --- a/library/vendor/Zend/Loader/PluginLoader/.svn/text-base/Exception.php.svn-base +++ /dev/null @@ -1,39 +0,0 @@ -