public function has($name): bool
    {
        try {
            $this->container->get($name);

            return true;
        } catch (\Exception $e) {
            return false;
        }
    }
public function has($name): bool
    {
        try {
            $this->container->get($name);

            return true;
        } catch (\Exception $e) {
            return false;
        }
    }
public function has ( $ name ) : bool { try { $ this -> container -> get ( $ name ) ; return true ; } catch ( \ Exception $ e ) { return false ; } }
Check if service is registered.
Check if service is registered .