1 | <?php |
||
16 | class HttpFactory |
||
17 | { |
||
18 | /** |
||
19 | * Method to create an Http instance. |
||
20 | * |
||
21 | * @param array|\ArrayAccess $options Client options array. |
||
22 | * @param array|string $adapters Adapter (string) or queue of adapters (array) to use for communication. |
||
23 | * |
||
24 | * @return Http |
||
25 | * |
||
26 | * @since 1.0 |
||
27 | * @throws \InvalidArgumentException |
||
28 | * @throws \RuntimeException |
||
29 | */ |
||
30 | public static function getHttp($options = array(), $adapters = null) |
||
46 | |||
47 | /** |
||
48 | * Finds an available TransportInterface object for communication |
||
49 | * |
||
50 | * @param array|\ArrayAccess $options Options for creating TransportInterface object |
||
51 | * @param array|string $default Adapter (string) or queue of adapters (array) to use |
||
52 | * |
||
53 | * @return TransportInterface|boolean Interface sub-class or boolean false if no adapters are available |
||
54 | * |
||
55 | * @since 1.0 |
||
56 | * @throws \InvalidArgumentException |
||
57 | */ |
||
58 | public static function getAvailableDriver($options = array(), $default = null) |
||
99 | |||
100 | /** |
||
101 | * Get the HTTP transport handlers |
||
102 | * |
||
103 | * @return array An array of available transport handlers |
||
104 | * |
||
105 | * @since 1.0 |
||
106 | */ |
||
107 | public static function getHttpTransports() |
||
138 | } |
||
139 |