src/Core/Injector/Injector.php
public function getServiceSpec($name, $inherit = true)
    {
        if (isset($this->specs[$name])) {
            return $this->specs[$name];
        }

        // Lazy load
        $config = $this->configLocator->locateConfigFor($name);
        if ($config) {
            $this->load([$name => $config]);
            if (isset($this->specs[$name])) {
                return $this->specs[$name];
            }
        }

        // Fail over to parent service if allowed
        if (!$inherit || !strpos($name, '.')) {
            return null;
        }

        return $this->getServiceSpec(substr($name, 0, strrpos($name, '.')));
    }
public function getServiceSpec($name, $inherit = true)
    {
        if (isset($this->specs[$name])) {
            return $this->specs[$name];
        }

        // Lazy load
        $config = $this->configLocator->locateConfigFor($name);
        if ($config) {
            $this->load([$name => $config]);
            if (isset($this->specs[$name])) {
                return $this->specs[$name];
            }
        }

        // Fail over to parent service if allowed
        if (!$inherit || !strpos($name, '.')) {
            return null;
        }

        return $this->getServiceSpec(substr($name, 0, strrpos($name, '.')));
    }
public function getServiceSpec ( $ name , $ inherit = true ) { if ( isset ( $ this -> specs [ $ name ] ) ) { return $ this -> specs [ $ name ] ; } // Lazy load $ config = $ this -> configLocator -> locateConfigFor ( $ name ) ; if ( $ config ) { $ this -> load ( [ $ name => $ config ] ) ; if ( isset ( $ this -> specs [ $ name ] ) ) { return $ this -> specs [ $ name ] ; } } // Fail over to parent service if allowed if ( ! $ inherit || ! strpos ( $ name , '.' ) ) { return null ; } return $ this -> getServiceSpec ( substr ( $ name , 0 , strrpos ( $ name , '.' ) ) ) ; }
Search for spec, lazy-loading in from config locator.
Falls back to parent service name if unloaded

@param string $name
@param bool $inherit Set to true to inherit from parent service if `.` suffixed
E.g. 'Psr/Log/LoggerInterface.custom' would fail over to 'Psr/Log/LoggerInterface'
@return mixed|object
Search for spec lazy - loading in from config locator . Falls back to parent service name if unloaded