src/Factory.php
public static function service(string $sServiceName, ?string $sComponentName = ''): object
    {
        return static::getServiceOrModel(
            static::$aLoadedItems['SERVICES'],
            'services',
            $sServiceName,
            $sComponentName,
            array_slice(func_get_args(), 2)
        );
    }
public static function service(string $sServiceName, ?string $sComponentName = ''): object
    {
        return static::getServiceOrModel(
            static::$aLoadedItems['SERVICES'],
            'services',
            $sServiceName,
            $sComponentName,
            array_slice(func_get_args(), 2)
        );
    }
public static function service ( string $ sServiceName , ? string $ sComponentName = '' ) : object { return static :: getServiceOrModel ( static :: $ aLoadedItems [ 'SERVICES' ] , 'services' , $ sServiceName , $ sComponentName , array_slice ( func_get_args ( ) , 2 ) ) ; }
Return a service from the container.

@param string $sServiceName   The service name
@param string $sComponentName The name of the component which provides the service

@return object
@throws FactoryException
@todo (Pablo - 2019-03-22) - Consider forcing all servcies to extend a base class (and add a typehint)
Return a service from the container .