public function getService($name)
    {
        if (array_key_exists($name, $this->services)) {
            return $this->services[$name];
        }

        throw new KeyNotFoundInSetException($name, array_keys($this->services), 'services');
    }
public function getService($name)
    {
        if (array_key_exists($name, $this->services)) {
            return $this->services[$name];
        }

        throw new KeyNotFoundInSetException($name, array_keys($this->services), 'services');
    }
public function getService ( $ name ) { if ( array_key_exists ( $ name , $ this -> services ) ) { return $ this -> services [ $ name ] ; } throw new KeyNotFoundInSetException ( $ name , array_keys ( $ this -> services ) , 'services' ) ; }
Returns service object based on service name.

@param string $name Service name

@throws KeyNotFoundInSetException

@return Service|null
Returns service object based on service name .