1 | <?php |
||
7 | class MoipOAuth implements MoipAuthentication |
||
8 | { |
||
9 | /** |
||
10 | * Access Token. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | private $accessToken; |
||
15 | |||
16 | /** |
||
17 | * Create a new MoipOAuth instance. |
||
18 | * |
||
19 | * @param string $accessToken |
||
20 | */ |
||
21 | public function __construct($accessToken) |
||
22 | { |
||
23 | $this->accessToken = $accessToken; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Register hooks as needed. |
||
28 | * |
||
29 | * This method is called in {@see Requests::request} when the user has set |
||
30 | * an instance as the 'auth' option. Use this callback to register all the |
||
31 | * hooks you'll need. |
||
32 | * |
||
33 | * @see Requests_Hooks::register |
||
34 | * |
||
35 | * @param Requests_Hooks $hooks Hook system |
||
36 | */ |
||
37 | public function register(Requests_Hooks &$hooks) |
||
41 | |||
42 | /** |
||
43 | * Sets the authentication header. |
||
44 | * |
||
45 | * @param string $url |
||
46 | * @param array $headers |
||
47 | * @param array|string $data |
||
48 | * @param string $type |
||
49 | * @param array $options |
||
50 | */ |
||
51 | public function before_request(&$url, &$headers, &$data, &$type, &$options) |
||
55 | } |
||
56 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.