src/Factory.php
public static function factory(string $sFactoryName, ?string $sComponentName = ''): object
    {
        return call_user_func_array(
            self::getService('factories', $sFactoryName, $sComponentName),
            array_slice(func_get_args(), 2)
        );
    }
public static function factory(string $sFactoryName, ?string $sComponentName = ''): object
    {
        return call_user_func_array(
            self::getService('factories', $sFactoryName, $sComponentName),
            array_slice(func_get_args(), 2)
        );
    }
public static function factory ( string $ sFactoryName , ? string $ sComponentName = '' ) : object { return call_user_func_array ( self :: getService ( 'factories' , $ sFactoryName , $ sComponentName ) , array_slice ( func_get_args ( ) , 2 ) ) ; }
Return a factory from the container.

@param string $sFactoryName   The factory name
@param string $sComponentName The name of the component which provides the factory

@return object
@throws FactoryException
Return a factory from the container .