1 <?php
2 /**
3 * @package Joomla.Platform
4 * @subpackage Http
5 *
6 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE
8 */
9
10 defined('JPATH_PLATFORM') or die;
11
12 use Joomla\Registry\Registry;
13
14 /**
15 * Wrapper class for JHttpFactory
16 *
17 * @package Joomla.Platform
18 * @subpackage Http
19 * @since 3.4
20 */
21 class JHttpWrapperFactory
22 {
23 /**
24 * Helper wrapper method for getHttp
25 *
26 * @param Registry $options Client options object.
27 * @param mixed $adapters Adapter (string) or queue of adapters (array) to use for communication.
28 *
29 * @return JHttp Joomla Http class
30 *
31 * @see JHttpFactory::getHttp()
32 * @since 3.4
33 * @throws RuntimeException
34 */
35 public function getHttp(Registry $options = null, $adapters = null)
36 {
37 return JHttpFactory::getHttp($options, $adapters);
38 }
39
40 /**
41 * Helper wrapper method for getAvailableDriver
42 *
43 * @param Registry $options Option for creating http transport object.
44 * @param mixed $default Adapter (string) or queue of adapters (array) to use.
45 *
46 * @return JHttpTransport Interface sub-class
47 *
48 * @see JHttpFactory::getAvailableDriver()
49 * @since 3.4
50 */
51 public function getAvailableDriver(Registry $options, $default = null)
52 {
53 return JHttpFactory::getAvailableDriver($options, $default);
54 }
55
56 /**
57 * Helper wrapper method for getHttpTransports
58 *
59 * @return array An array of available transport handlers
60 *
61 * @see JHttpFactory::getHttpTransports()
62 * @since 3.4
63 */
64 public function getHttpTransports()
65 {
66 return JHttpFactory::getHttpTransports();
67 }
68 }
69