1 | <?php |
||
15 | final class StarCitizens |
||
16 | { |
||
17 | /** |
||
18 | * @var bool|StarCitizensClient |
||
19 | */ |
||
20 | private static $client = false; |
||
21 | |||
22 | private $systems = [ |
||
23 | "accounts" => [ |
||
24 | "base_action" => "full_profile", |
||
25 | "actions" => [ |
||
26 | "full_profile" => '\Profile', |
||
27 | "threads" => ['\Thread', '', 'thread_id'], |
||
28 | "posts" => ['\Post', 'post', 'post_id'], |
||
29 | ] |
||
30 | ] |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * StarCitizens constructor. |
||
35 | */ |
||
36 | 3 | public function __construct() |
|
40 | |||
41 | /** |
||
42 | * @param $name |
||
43 | * @param $arguments |
||
44 | * @return bool|mixed |
||
45 | * @throws \Exception |
||
46 | */ |
||
47 | 3 | function __call($name, $arguments) |
|
73 | |||
74 | /** |
||
75 | * Find an entity |
||
76 | * |
||
77 | * @param $id |
||
78 | * @param $system |
||
79 | * @param $profileType |
||
80 | * @param bool $cache |
||
81 | * @param bool $raw |
||
82 | * @return bool|mixed |
||
83 | */ |
||
84 | 2 | private function find($id, $system, $profileType, $cache = false, $raw = false) |
|
99 | |||
100 | /** |
||
101 | * @param $id |
||
102 | * @param $system |
||
103 | * @param $profileType |
||
104 | * @param $cache |
||
105 | * @return array |
||
106 | */ |
||
107 | 2 | private function getParams($id, $system, $profileType, $cache) |
|
122 | |||
123 | /** |
||
124 | * @param $response |
||
125 | * @param $profileType |
||
126 | * @param $raw |
||
127 | * |
||
128 | * @return bool|mixed |
||
129 | */ |
||
130 | 2 | private function checkResponse($response, $profileType, $raw) |
|
142 | |||
143 | /** |
||
144 | * Setup the client |
||
145 | */ |
||
146 | 3 | private static function setupClient() |
|
152 | |||
153 | /** |
||
154 | * Fills our model in with the provided data |
||
155 | * |
||
156 | * @param $model |
||
157 | * @param $fillData |
||
158 | * |
||
159 | * @return Model |
||
160 | */ |
||
161 | 2 | private function fillModel($model, $fillData) |
|
172 | } |
Late static binding only has effect in subclasses. A
final
class cannot be extended anymore so late static binding cannot occurr. Consider replacingstatic::
withself::
.To learn more about late static binding, please refer to the PHP core documentation.