protected function wrapService(string $name, ?array $parameters = null)
    {
        $config = $this->config->get($name);
        if (true === $config['wrap']) {
            $that = $this;

            return function () use ($that, $name, $parameters) {
                return $that->autoWireClass($name, $parameters);
            };
        }

        return $this->autoWireClass($name, $parameters);
    }
protected function wrapService(string $name, ?array $parameters = null)
    {
        $config = $this->config->get($name);
        if (true === $config['wrap']) {
            $that = $this;

            return function () use ($that, $name, $parameters) {
                return $that->autoWireClass($name, $parameters);
            };
        }

        return $this->autoWireClass($name, $parameters);
    }
protected function wrapService ( string $ name , ? array $ parameters = null ) { $ config = $ this -> config -> get ( $ name ) ; if ( true === $ config [ 'wrap' ] ) { $ that = $ this ; return function ( ) use ( $ that , $ name , $ parameters ) { return $ that -> autoWireClass ( $ name , $ parameters ) ; } ; } return $ this -> autoWireClass ( $ name , $ parameters ) ; }
Wrap resolved service in callable if enabled.
Wrap resolved service in callable if enabled .