src/Console/Command/Command.php
public function getService($name)
    {
        $container = $this->getContainer();

        return !is_null($container) && isset($container[$name]) ? $container[$name] : null;
    }
public function getService($name)
    {
        $container = $this->getContainer();

        return !is_null($container) && isset($container[$name]) ? $container[$name] : null;
    }
public function getService ( $ name ) { $ container = $ this -> getContainer ( ) ; return ! is_null ( $ container ) && isset ( $ container [ $ name ] ) ? $ container [ $ name ] : null ; }
Get service in container

Returns a service contained in the application container or null if none
is found with that name.

@param string $name Name of service
@return mixed
Get service in container