public function addProvider($providerOrClass)
    {
        // get the provider object
        $prov  = $this->getProviderInstance($providerOrClass);

        // check added or not
        $class = get_class($prov);
        if (isset($this->providers[$class])) {
            throw new LogicException(
                Message::get(
                    Message::EXT_PROVIDER_DUPPED,
                    get_class($prov)
                ),
                Message::EXT_PROVIDER_DUPPED
            );
        } else {
            // add to the pool
            $this->providers[$class] =
                $prov->setContainer($this->getContainer());
        }
    }
public function addProvider($providerOrClass)
    {
        // get the provider object
        $prov  = $this->getProviderInstance($providerOrClass);

        // check added or not
        $class = get_class($prov);
        if (isset($this->providers[$class])) {
            throw new LogicException(
                Message::get(
                    Message::EXT_PROVIDER_DUPPED,
                    get_class($prov)
                ),
                Message::EXT_PROVIDER_DUPPED
            );
        } else {
            // add to the pool
            $this->providers[$class] =
                $prov->setContainer($this->getContainer());
        }
    }
public function addProvider ( $ providerOrClass ) { // get the provider object $ prov = $ this -> getProviderInstance ( $ providerOrClass ) ; // check added or not $ class = get_class ( $ prov ) ; if ( isset ( $ this -> providers [ $ class ] ) ) { throw new LogicException ( Message :: get ( Message :: EXT_PROVIDER_DUPPED , get_class ( $ prov ) ) , Message :: EXT_PROVIDER_DUPPED ) ; } else { // add to the pool $ this -> providers [ $ class ] = $ prov -> setContainer ( $ this -> getContainer ( ) ) ; } }
Add provider to the registry

@param  ProviderAbstract|string $providerOrClass provider or classname
@return void
@access public
@internal
Add provider to the registry