import v2.0.0.0_RC3 | 2012-07-01

https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
2019-07-17 22:31:04 +02:00
parent 38c146901c
commit 2f397f01f7
2677 changed files with 296182 additions and 45159 deletions

View File

@ -17,7 +17,7 @@
* @subpackage Framework
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Abstract.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Abstract.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -33,25 +33,25 @@ require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php';
/**
* This is a convenience class.
*
*
* At current it will return the request and response from the client registry
* as they are the more common things that will be needed by providers
*
*
*
* @category Zend
* @package Zend_Tool
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Tool_Framework_Provider_Abstract
abstract class Zend_Tool_Framework_Provider_Abstract
implements Zend_Tool_Framework_Provider_Interface, Zend_Tool_Framework_Registry_EnabledInterface
{
/**
* @var Zend_Tool_Framework_Registry_Interface
*/
protected $_registry = null;
/**
* setRegistry() - required by Zend_Tool_Framework_Registry_EnabledInterface
*
@ -63,6 +63,6 @@ abstract class Zend_Tool_Framework_Provider_Abstract
$this->_registry = $registry;
return $this;
}
}

View File

@ -17,7 +17,7 @@
* @subpackage Framework
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Exception.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -31,7 +31,7 @@ require_once 'Zend/Tool/Framework/Exception.php';
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Tool_Framework_Provider_Exception extends Zend_Tool_Framework_Exception
class Zend_Tool_Framework_Provider_Exception extends Zend_Tool_Framework_Exception
{
}

View File

@ -16,7 +16,7 @@
* @package Zend_Tool
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Interactable.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Interactable.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -26,5 +26,5 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface Zend_Tool_Framework_Provider_Interactable
{
{
}

View File

@ -17,7 +17,7 @@
* @subpackage Framework
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Repository.php 16972 2009-07-22 18:44:24Z ralph $
* @version $Id: Repository.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -36,25 +36,25 @@ require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php';
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Tool_Framework_Provider_Repository
class Zend_Tool_Framework_Provider_Repository
implements Zend_Tool_Framework_Registry_EnabledInterface, IteratorAggregate, Countable
{
/**
* @var Zend_Tool_Framework_Registry
*/
protected $_registry = null;
/**
* @var bool
*/
protected $_processOnAdd = false;
/**
* @var Zend_Tool_Framework_Provider_Interface[]
*/
protected $_unprocessedProviders = array();
/**
* @var Zend_Tool_Framework_Provider_Signature[]
*/
@ -64,7 +64,7 @@ class Zend_Tool_Framework_Provider_Repository
* @var array Array of Zend_Tool_Framework_Provider_Inteface
*/
protected $_providers = array();
/**
* setRegistry()
*
@ -76,7 +76,7 @@ class Zend_Tool_Framework_Provider_Repository
$this->_registry = $registry;
return $this;
}
/**
* Set the ProcessOnAdd flag
*
@ -88,7 +88,7 @@ class Zend_Tool_Framework_Provider_Repository
$this->_processOnAdd = (bool) $processOnAdd;
return $this;
}
/**
* Add a provider to the repository for processing
*
@ -100,30 +100,30 @@ class Zend_Tool_Framework_Provider_Repository
if ($provider instanceof Zend_Tool_Framework_Registry_EnabledInterface) {
$provider->setRegistry($this->_registry);
}
if (method_exists($provider, 'getName')) {
$providerName = $provider->getName();
} else {
$providerName = $this->_parseName($provider);
}
// if a provider by the given name already exist, and its not set as overwritable, throw exception
if (!$overwriteExistingProvider &&
(array_key_exists($providerName, $this->_unprocessedProviders)
|| array_key_exists($providerName, $this->_providers)))
if (!$overwriteExistingProvider &&
(array_key_exists($providerName, $this->_unprocessedProviders)
|| array_key_exists($providerName, $this->_providers)))
{
require_once 'Zend/Tool/Framework/Provider/Exception.php';
throw new Zend_Tool_Framework_Provider_Exception('A provider by the name ' . $providerName
throw new Zend_Tool_Framework_Provider_Exception('A provider by the name ' . $providerName
. ' is already registered and $overrideExistingProvider is set to false.');
}
$this->_unprocessedProviders[$providerName] = $provider;
// if process has already been called, process immediately.
if ($this->_processOnAdd) {
$this->process();
}
return $this;
}
@ -134,7 +134,7 @@ class Zend_Tool_Framework_Provider_Repository
} else {
$targetProviderClassName = (string) $providerOrClassName;
}
if (!$processedOnly) {
foreach ($this->_unprocessedProviders as $unprocessedProvider) {
if (get_class($unprocessedProvider) == $targetProviderClassName) {
@ -142,16 +142,16 @@ class Zend_Tool_Framework_Provider_Repository
}
}
}
foreach ($this->_providers as $processedProvider) {
if (get_class($processedProvider) == $targetProviderClassName) {
return true;
}
}
return false;
}
/**
* Process all of the unprocessed providers
*
@ -164,24 +164,24 @@ class Zend_Tool_Framework_Provider_Repository
// create a signature for the provided provider
$providerSignature = new Zend_Tool_Framework_Provider_Signature($provider);
if ($providerSignature instanceof Zend_Tool_Framework_Registry_EnabledInterface) {
$providerSignature->setRegistry($this->_registry);
}
$providerSignature->process();
// ensure the name is lowercased for easier searching
$providerName = strtolower($providerName);
// add to the appropraite place
$this->_providerSignatures[$providerName] = $providerSignature;
$this->_providers[$providerName] = $providerSignature->getProvider();
// remove from unprocessed array
unset($this->_unprocessedProviders[$providerName]);
}
}
/**
@ -203,7 +203,7 @@ class Zend_Tool_Framework_Provider_Repository
{
return $this->_providerSignatures;
}
/**
* getProvider()
*
@ -235,7 +235,7 @@ class Zend_Tool_Framework_Provider_Repository
{
return count($this->_providers);
}
/**
* getIterator() - Required by the IteratorAggregate Interface
*
@ -245,7 +245,7 @@ class Zend_Tool_Framework_Provider_Repository
{
return new ArrayIterator($this->getProviders());
}
/**
* _parseName - internal method to determine the name of an action when one is not explicity provided.
*

View File

@ -17,7 +17,7 @@
* @subpackage Framework
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Signature.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Signature.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -36,9 +36,9 @@ require_once 'Zend/Tool/Framework/Registry/EnabledInterface.php';
require_once 'Zend/Tool/Framework/Action/Base.php';
/**
* The purpose of Zend_Tool_Framework_Provider_Signature is to derive
* The purpose of Zend_Tool_Framework_Provider_Signature is to derive
* callable signatures from the provided provider.
*
*
* @category Zend
* @package Zend_Tool
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
@ -51,27 +51,27 @@ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Regi
* @var Zend_Tool_Framework_Registry
*/
protected $_registry = null;
/**
* @var Zend_Tool_Framework_Provider_Interface
*/
protected $_provider = null;
/**
* @var string
*/
protected $_name = null;
/**
* @var array
*/
protected $_specialties = array();
/**
* @var array
*/
protected $_actionableMethods = array();
/**
* @var unknown_type
*/
@ -86,7 +86,7 @@ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Regi
* @var bool
*/
protected $_isProcessed = false;
/**
* Constructor
*
@ -109,16 +109,16 @@ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Regi
$this->_registry = $registry;
return $this;
}
public function process()
{
if ($this->_isProcessed) {
return;
}
$this->_process();
}
/**
* getName() of the provider
*
@ -148,7 +148,7 @@ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Regi
{
return $this->_providerReflection;
}
/**
* getSpecialities()
*
@ -161,14 +161,14 @@ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Regi
/**
* getActions()
*
*
* @return array Array of Actions
*/
public function getActions()
{
return $this->_actions;
}
/**
* getActionableMethods()
*
@ -180,7 +180,7 @@ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Regi
}
/**
* getActionableMethod() - Get an actionable method by name, this will return an array of
* getActionableMethod() - Get an actionable method by name, this will return an array of
* useful information about what can be exectued on this provider
*
* @param string $methodName
@ -191,12 +191,12 @@ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Regi
if (isset($this->_actionableMethods[$methodName])) {
return $this->_actionableMethods[$methodName];
}
return false;
}
/**
* getActionableMethodByActionName() - Get an actionable method by its action name, this
* getActionableMethodByActionName() - Get an actionable method by its action name, this
* will return an array of useful information about what can be exectued on this provider
*
* @param string $actionName
@ -296,21 +296,21 @@ class Zend_Tool_Framework_Provider_Signature implements Zend_Tool_Framework_Regi
* the following will determine what methods are actually actionable
* public, non-static, non-underscore prefixed, classes that dont
* contain the name "
*/
if (!$method->getDeclaringClass()->isInstantiable()
|| !$method->isPublic()
|| $methodName[0] == '_'
*/
if (!$method->getDeclaringClass()->isInstantiable()
|| !$method->isPublic()
|| $methodName[0] == '_'
|| $method->isStatic()
|| in_array($methodName, array('getContextClasses', 'getName')) // other protected public methods will nee to go here
) {
continue;
}
/**
* check to see if the method was a required method by a Zend_Tool_* interface
*/
foreach ($method->getDeclaringClass()->getInterfaces() as $methodDeclaringClassInterface) {
if (strpos($methodDeclaringClassInterface->getName(), 'Zend_Tool_') === 0
if (strpos($methodDeclaringClassInterface->getName(), 'Zend_Tool_') === 0
&& $methodDeclaringClassInterface->hasMethod($methodName)) {
continue 2;
}