public function has($service)
    {
        if (!is_string($service)) {
            throw new InvalidArgumentException(sprintf(
                'Service name must be a string, received "%s"', gettype($service)
            ));
        }

        return isset($this->container[$service]);
    }
public function has($service)
    {
        if (!is_string($service)) {
            throw new InvalidArgumentException(sprintf(
                'Service name must be a string, received "%s"', gettype($service)
            ));
        }

        return isset($this->container[$service]);
    }
public function has ( $ service ) { if ( ! is_string ( $ service ) ) { throw new InvalidArgumentException ( sprintf ( 'Service name must be a string, received "%s"' , gettype ( $ service ) ) ) ; } return isset ( $ this -> container [ $ service ] ) ; }
Check whether service has been registered

@param string $service
@throws \InvalidArgumentException if service's name wasn't a string
@return boolean
Check whether service has been registered