Method | Description | |
---|---|---|
__construct ( string $api, string $class, boolean $normalize, |
Base constructor. | |
getMethod ( ) : string | Get the http method. | |
getUrl ( ) : string | Returns the current url path. | |
processRequest ( ) : |
Process the api rest request and return the CallbackResult object. | |
setHttpMethod ( string $method ) | Force sets the http method. | |
setUrl ( string $url ) | Set the url. |
Method | Description | |
---|---|---|
doesPatternMatch ( string $pattern, array $data, string $url ) : boolean | Checks if $pattern matches $url. | |
getVersion ( ) : string | Check if there is a specific version set in the request headers, if not, it returns 'current' version. | |
matchDefaultMethod ( array $callbacks, string $url, $classUrl ) : array | This is the fallback method that tries to match a default method. | |
matchMethod ( array $callbacks, string $url ) : array | Does the matching of method if method name is present in the url. | |
matchRequest ( array &$classData ) : |
Analyzes the request and tries to match an api method. | |
tryMatchingOptionalParams ( string $pattern, array $data, string $url ) : boolean | This method adds the default values for missing parameters and tries to do the match again. |
public __construct ( string $api, string $class, boolean $normalize, |
||
$api | string | Name of the rest api configuration. |
$class | string | Name of the rest api class. |
$normalize | boolean | Should the url parts be normalized or not. |
$compilerCache | Current compiler cache instance. |
public processRequest ( ) : |
||
return |
public setHttpMethod ( string $method ) | ||
$method | string | Method name. |