src/AutoInject.php
private function getProvider($identifier)
    {
        if (isset($this->interfaceProviders[$identifier])) {
            $this->assertSingleInterfaceProvider($identifier);
            return reset($this->interfaceProviders[$identifier]);
        } elseif (isset($this->classProviders[$identifier])) {
            $this->assertSingleClassProvider($identifier);
            return reset($this->classProviders[$identifier]);
        } else {
            return false;
        }
    }
private function getProvider($identifier)
    {
        if (isset($this->interfaceProviders[$identifier])) {
            $this->assertSingleInterfaceProvider($identifier);
            return reset($this->interfaceProviders[$identifier]);
        } elseif (isset($this->classProviders[$identifier])) {
            $this->assertSingleClassProvider($identifier);
            return reset($this->classProviders[$identifier]);
        } else {
            return false;
        }
    }
private function getProvider ( $ identifier ) { if ( isset ( $ this -> interfaceProviders [ $ identifier ] ) ) { $ this -> assertSingleInterfaceProvider ( $ identifier ) ; return reset ( $ this -> interfaceProviders [ $ identifier ] ) ; } elseif ( isset ( $ this -> classProviders [ $ identifier ] ) ) { $ this -> assertSingleClassProvider ( $ identifier ) ; return reset ( $ this -> classProviders [ $ identifier ] ) ; } else { return false ; } }
Get a provider for an identifier
using this method when there are multiple providers for an
identifier will cause an exception to be thrown
@param $identifier
@return mixed
@throws \InvalidArgumentException
Get a provider for an identifier using this method when there are multiple providers for an identifier will cause an exception to be thrown