示例#1
0
 /**
  * Process all of the unprocessed providers
  *
  */
 public function process()
 {
     // process all providers in the unprocessedProviders array
     //foreach ($this->_unprocessedProviders as $providerName => $provider) {
     reset($this->_unprocessedProviders);
     while ($this->_unprocessedProviders) {
         $providerName = key($this->_unprocessedProviders);
         $provider = array_shift($this->_unprocessedProviders);
         // create a signature for the provided provider
         $providerSignature = new Signature($provider);
         if ($providerSignature instanceof RegistryEnabled) {
             $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();
         if ($provider instanceof Initializable) {
             $provider->initialize();
         }
     }
 }
示例#2
0
 public function testGetSpecialtiesReturnsParsedSpecialtiesThrowsExceptionOnBadReturnValue()
 {
     $signature = new Provider\Signature(new \ZendTest\Tool\Framework\Provider\TestAsset\ProviderFullFeaturedBadSpecialties2());
     $signature->setRegistry($this->_registry);
     $this->setExpectedException('Zend\\Tool\\Framework\\Provider\\Exception\\RuntimeException');
     $signature->process();
 }
示例#3
0
    /**
     * Process all of the unprocessed providers
     *
     */
    public function process()
    {

        // process all providers in the unprocessedProviders array
        foreach ($this->_unprocessedProviders as $providerName => $provider) {

            // create a signature for the provided provider
            $providerSignature = new Signature($provider);

            if ($providerSignature instanceof RegistryEnabled) {
                $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]);
        }

    }