protected function getRequestClassForMethod(string $method): string
    {
        if (in_array($method, ['login', 'logout'])) {
            return sprintf('DMT\\WebservicesNl\\Client\\Request\\%sRequest', ucfirst($method));
        }

        foreach ($this->getInstalledServices() as $service) {
            if (stripos($method, $service) !== 0) {
                continue;
            }

            $requestClass = sprintf(
                'DMT\\WebservicesNl\\%s\\Request\\%sRequest',
                $service,
                substr($method, strlen($service))
            );

            if (class_exists($requestClass)) {
                return $requestClass;
            }
        }

        throw new \BadMethodCallException("Function `$method` is not a valid method for this service");
    }
protected function getRequestClassForMethod(string $method): string
    {
        if (in_array($method, ['login', 'logout'])) {
            return sprintf('DMT\\WebservicesNl\\Client\\Request\\%sRequest', ucfirst($method));
        }

        foreach ($this->getInstalledServices() as $service) {
            if (stripos($method, $service) !== 0) {
                continue;
            }

            $requestClass = sprintf(
                'DMT\\WebservicesNl\\%s\\Request\\%sRequest',
                $service,
                substr($method, strlen($service))
            );

            if (class_exists($requestClass)) {
                return $requestClass;
            }
        }

        throw new \BadMethodCallException("Function `$method` is not a valid method for this service");
    }
protected function getRequestClassForMethod ( string $ method ) : string { if ( in_array ( $ method , [ 'login' , 'logout' ] ) ) { return sprintf ( 'DMT\\WebservicesNl\\Client\\Request\\%sRequest' , ucfirst ( $ method ) ) ; } foreach ( $ this -> getInstalledServices ( ) as $ service ) { if ( stripos ( $ method , $ service ) !== 0 ) { continue ; } $ requestClass = sprintf ( 'DMT\\WebservicesNl\\%s\\Request\\%sRequest' , $ service , substr ( $ method , strlen ( $ service ) ) ) ; if ( class_exists ( $ requestClass ) ) { return $ requestClass ; } } throw new \ BadMethodCallException ( "Function `$method` is not a valid method for this service" ) ; }
Get the request that corresponds to the service method.

@param string $method

@return string
@throws \BadMethodCallException
Get the request that corresponds to the service method .