1 | <?php |
||
21 | class ComicVine |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Api Key |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | public static $key; |
||
30 | |||
31 | /** |
||
32 | * Connection object. |
||
33 | * |
||
34 | * @var \ComicVine\Api\Connection\Connection; |
||
35 | */ |
||
36 | public static $conn; |
||
37 | |||
38 | /** |
||
39 | * Create instance of RegisterKey. |
||
40 | * |
||
41 | * @param $key |
||
42 | * |
||
43 | * @return \ComicVine\Api\RegisterKey |
||
44 | */ |
||
45 | public static function makeApiKey($key) |
||
49 | |||
50 | /** |
||
51 | * Register a key to make connection. |
||
52 | * |
||
53 | * @param \ComicVine\Api\RegisterKey $key |
||
54 | * @param \ComicVine\Api\Connection\Connection $conn |
||
55 | */ |
||
56 | public static function register(RegisterKey $key, Connection $conn = null) |
||
61 | |||
62 | /** |
||
63 | * Make a new controller to start defining request. |
||
64 | * |
||
65 | * @return \ComicVine\Api\Controllers\ControllerRequest |
||
66 | */ |
||
67 | public static function make() |
||
71 | |||
72 | /** |
||
73 | * Get API KEY. |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | public static function getKey() |
||
81 | |||
82 | /** |
||
83 | * Get Connection instance. |
||
84 | * |
||
85 | * @return CURLConnection |
||
86 | */ |
||
87 | public static function getConnection() |
||
91 | |||
92 | /** |
||
93 | * Simple factory for response format. |
||
94 | * |
||
95 | * @param string $formatType |
||
96 | * |
||
97 | * @return \ComicVine\Api\Response\Type\JsonFormat|\ComicVine\Api\Response\Type\XmlFormat |
||
98 | */ |
||
99 | public static function createFormat($formatType = 'json') |
||
110 | |||
111 | } |