| 1 | <?php |
||
| 8 | class Mock extends AbstractService |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Sends an authenticated API request to the path provided. |
||
| 12 | * If the path provided is not an absolute URI, the base API Uri (service-specific) will be used. |
||
| 13 | * |
||
| 14 | * @param string|UriInterface $path |
||
| 15 | * @param string $method HTTP method |
||
| 16 | * @param array $body Request body if applicable (an associative array will |
||
| 17 | * automatically be converted into a urlencoded body) |
||
| 18 | * @param array $extraHeaders Extra headers if applicable. These will override service-specific |
||
| 19 | * any defaults. |
||
| 20 | * |
||
| 21 | * @return string |
||
| 22 | */ |
||
| 23 | public function request($path, $method = 'GET', $body = null, array $extraHeaders = array()) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Returns the url to redirect to for authorization purposes. |
||
| 29 | * |
||
| 30 | * @param array $additionalParameters |
||
| 31 | * |
||
| 32 | * @return UriInterface |
||
| 33 | */ |
||
| 34 | public function getAuthorizationUri(array $additionalParameters = array()) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Returns the authorization API endpoint. |
||
| 40 | * |
||
| 41 | * @return UriInterface |
||
| 42 | */ |
||
| 43 | public function getAuthorizationEndpoint() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Returns the access token API endpoint. |
||
| 49 | * |
||
| 50 | * @return UriInterface |
||
| 51 | */ |
||
| 52 | public function getAccessTokenEndpoint() |
||
| 55 | |||
| 56 | public function testDetermineRequestUriFromPath($path, UriInterface $baseApiUri = null) |
||
| 60 | } |
||
| 61 |