public function get($serviceClassName)
    {
        if (false === $this->hasBeenInitialized) {
            throw new InitializationNotSetException(
                'You can get a service instance only when the service factory has been initialized.',
                1456419587
            );
        }

        if (false === $this->has($serviceClassName)) {
            throw new EntryNotFoundException(
                'The service "' . $serviceClassName . '" was not found in this service factory. Attach it before trying to get it!',
                1456419653
            );
        }

        return $this->serviceInstances[$serviceClassName];
    }
public function get($serviceClassName)
    {
        if (false === $this->hasBeenInitialized) {
            throw new InitializationNotSetException(
                'You can get a service instance only when the service factory has been initialized.',
                1456419587
            );
        }

        if (false === $this->has($serviceClassName)) {
            throw new EntryNotFoundException(
                'The service "' . $serviceClassName . '" was not found in this service factory. Attach it before trying to get it!',
                1456419653
            );
        }

        return $this->serviceInstances[$serviceClassName];
    }
public function get ( $ serviceClassName ) { if ( false === $ this -> hasBeenInitialized ) { throw new InitializationNotSetException ( 'You can get a service instance only when the service factory has been initialized.' , 1456419587 ) ; } if ( false === $ this -> has ( $ serviceClassName ) ) { throw new EntryNotFoundException ( 'The service "' . $ serviceClassName . '" was not found in this service factory. Attach it before trying to get it!' , 1456419653 ) ; } return $ this -> serviceInstances [ $ serviceClassName ] ; }
Returns the wanted service, if it was previously registered.

@param string $serviceClassName The class name of the wanted service.
@return AbstractService
@throws InitializationNotSetException
@throws EntryNotFoundException
Returns the wanted service if it was previously registered .