HttpClient.php
5 years ago
HttpClientCache.php
5 years ago
HttpClientInterface.php
5 years ago
OembedClient.php
5 years ago
HttpClientInterface.php
41 lines
| 1 | <?php |
| 2 | /** |
| 3 | * HttpClientInterface.php |
| 4 | * |
| 5 | * @package Embera |
| 6 | * @author Michael Pratt <yo@michael-pratt.com> |
| 7 | * @link http://www.michael-pratt.com/ |
| 8 | * |
| 9 | * For the full copyright and license information, please view the LICENSE |
| 10 | * file that was distributed with this source code. |
| 11 | */ |
| 12 | |
| 13 | namespace Embera\Http; |
| 14 | |
| 15 | /** |
| 16 | * This class is in charge of doing http requests. Its a very minimal |
| 17 | * wrapper for curl or file_get_contents |
| 18 | */ |
| 19 | interface HttpClientInterface |
| 20 | { |
| 21 | /** |
| 22 | * Sets the configuration array for this object |
| 23 | * |
| 24 | * @param array $config |
| 25 | * @return void |
| 26 | */ |
| 27 | public function setConfig(array $config = []); |
| 28 | |
| 29 | /** |
| 30 | * Executes http requests |
| 31 | * |
| 32 | * @param string $url |
| 33 | * @param array $params Additional parameters for the respective part |
| 34 | * @return string |
| 35 | * |
| 36 | * @throws \Exception when an error ocurred or if no way to do a request exists |
| 37 | */ |
| 38 | public function fetch($url, array $params = []); |
| 39 | |
| 40 | } |
| 41 |