src/Core/Injector/Injector.php
protected function getServiceNamedSpec($name, $constructorArgs = [])
    {
        $spec = $this->getServiceSpec($name);
        if ($spec) {
            // Resolve to exact service name (in case inherited)
            $name = $this->getServiceName($name);
        } else {
            // Late-generate config spec for non-configured spec
            $spec = [
                'class' => $name,
                'constructor' => $constructorArgs,
            ];
        }
        return [$name, $spec];
    }
protected function getServiceNamedSpec($name, $constructorArgs = [])
    {
        $spec = $this->getServiceSpec($name);
        if ($spec) {
            // Resolve to exact service name (in case inherited)
            $name = $this->getServiceName($name);
        } else {
            // Late-generate config spec for non-configured spec
            $spec = [
                'class' => $name,
                'constructor' => $constructorArgs,
            ];
        }
        return [$name, $spec];
    }
protected function getServiceNamedSpec ( $ name , $ constructorArgs = [ ] ) { $ spec = $ this -> getServiceSpec ( $ name ) ; if ( $ spec ) { // Resolve to exact service name (in case inherited) $ name = $ this -> getServiceName ( $ name ) ; } else { // Late-generate config spec for non-configured spec $ spec = [ 'class' => $ name , 'constructor' => $ constructorArgs , ] ; } return [ $ name , $ spec ] ; }
Get or build a named service and specification

@param string $name Service name
@param array $constructorArgs Optional constructor args
@return array
Get or build a named service and specification