1 | <?php |
||
12 | class Client extends \GuzzleHttp\Client |
||
13 | { |
||
14 | /** |
||
15 | * @const string Version number |
||
16 | */ |
||
17 | const VERSION = '0.0.1'; |
||
18 | |||
19 | /** |
||
20 | * Defaults to expecting that Apache Tomcat runs on port 8080 on localhost |
||
21 | * (127.0.0.1). |
||
22 | * |
||
23 | * @var array[] |
||
24 | */ |
||
25 | protected $options = [ |
||
26 | 'scheme' => 'https', |
||
27 | 'hostname' => 'localhost', |
||
28 | 'port' => '8080', |
||
29 | ]; |
||
30 | |||
31 | /** |
||
32 | * @param $options array |
||
33 | * |
||
34 | * @return void |
||
|
|||
35 | */ |
||
36 | 1 | public function __construct($options = []) |
|
59 | |||
60 | /** |
||
61 | * Authenticate and get Bearer token from SmartCall |
||
62 | * |
||
63 | * @param string $username |
||
64 | * @param string $password |
||
65 | * |
||
66 | * @throws Exception |
||
67 | * |
||
68 | * @return array |
||
69 | */ |
||
70 | public function auth($username, $password) |
||
100 | |||
101 | /** |
||
102 | * Test SmartCall is responding. |
||
103 | * |
||
104 | * @throws Exception |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | 1 | public function ping() |
|
124 | } |
||
125 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.