concrete/src/Service/Manager/ServiceManager.php
public function getService($handle, $version = '')
    {
        $result = null;
        if ($this->has($handle)) {
            $key = $handle;
            $version = (string) $version;
            if ($version !== '') {
                $key .= "@$version";
            }
            if (!isset($this->services[$key])) {
                $abstract = $this->extensions[$handle];
                $service = $this->buildService($abstract, $version);
                if ($service === null) {
                    throw new \RuntimeException('Invalid service binding.');
                }
                $this->services[$key] = $service;
            }
            $result = $this->services[$key];
        }

        return $result;
    }
public function getService($handle, $version = '')
    {
        $result = null;
        if ($this->has($handle)) {
            $key = $handle;
            $version = (string) $version;
            if ($version !== '') {
                $key .= "@$version";
            }
            if (!isset($this->services[$key])) {
                $abstract = $this->extensions[$handle];
                $service = $this->buildService($abstract, $version);
                if ($service === null) {
                    throw new \RuntimeException('Invalid service binding.');
                }
                $this->services[$key] = $service;
            }
            $result = $this->services[$key];
        }

        return $result;
    }
public function getService ( $ handle , $ version = '' ) { $ result = null ; if ( $ this -> has ( $ handle ) ) { $ key = $ handle ; $ version = ( string ) $ version ; if ( $ version !== '' ) { $ key .= "@$version" ; } if ( ! isset ( $ this -> services [ $ key ] ) ) { $ abstract = $ this -> extensions [ $ handle ] ; $ service = $ this -> buildService ( $ abstract , $ version ) ; if ( $ service === null ) { throw new \ RuntimeException ( 'Invalid service binding.' ) ; } $ this -> services [ $ key ] = $ service ; } $ result = $ this -> services [ $ key ] ; } return $ result ; }
Get the driver for this handle.

@param string $handle
@param string $version

@return ServiceInterface|null
Get the driver for this handle .