public function has($key)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException(htmlspecialchars(
                "Get function only accepts strings. Input was: $key."
            ));
        }

        return isset($this->services[ $key ]) || isset($this->instances[ $key ]);
    }
public function has($key)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException(htmlspecialchars(
                "Get function only accepts strings. Input was: $key."
            ));
        }

        return isset($this->services[ $key ]) || isset($this->instances[ $key ]);
    }
public function has ( $ key ) { if ( ! is_string ( $ key ) ) { throw new \ InvalidArgumentException ( htmlspecialchars ( "Get function only accepts strings. Input was: $key." ) ) ; } return isset ( $ this -> services [ $ key ] ) || isset ( $ this -> instances [ $ key ] ) ; }
Si le service existe.

@param string $key Nom du service.

@throws \InvalidArgumentException La fonction get accepte uniquement les chaînes de caractères.
@return bool
Si le service existe .