1 | <?php |
||
10 | abstract class ApiObject |
||
11 | { |
||
12 | /** @var string */ |
||
13 | protected $id; |
||
14 | |||
15 | /** @var string */ |
||
16 | protected static $apiKey; |
||
17 | |||
18 | /** @var string */ |
||
19 | protected static $subdomain; |
||
20 | |||
21 | /** @var Client */ |
||
22 | protected static $client; |
||
23 | |||
24 | protected function buildUrl($url) |
||
31 | |||
32 | /** |
||
33 | * @param string $subdomain The subdomain for your Wufoo account |
||
34 | * @param string $key The API key used to access this information |
||
35 | */ |
||
36 | public static function configureApi($subdomain, $key) |
||
47 | |||
48 | /** |
||
49 | * Sanitize an array of query parameters to prepare the array to be converted into a query string. |
||
50 | * |
||
51 | * @param array $parameters |
||
52 | */ |
||
53 | protected static function prepareQueryParameters(array $parameters) |
||
64 | |||
65 | /** |
||
66 | * Build a query string from an array. |
||
67 | * |
||
68 | * @param array $parameters |
||
69 | * |
||
70 | * @return string A query string ready for HTTP requests |
||
71 | */ |
||
72 | protected static function buildQuery(array $parameters) |
||
76 | |||
77 | /** |
||
78 | * Interpolates context values into the message placeholders. |
||
79 | * |
||
80 | * @author PHP Framework Interoperability Group |
||
81 | * |
||
82 | * @param string $message |
||
83 | * @param array $context |
||
84 | * |
||
85 | * @return string |
||
86 | */ |
||
87 | protected static function interpolate($message, array $context) |
||
99 | |||
100 | protected static function setIfNotNull(array &$query, $key, &$checkNull) |
||
107 | } |
||
108 |