| 1 | <?php | ||
| 5 | class Curl | ||
| 6 | { | ||
| 7 | /** | ||
| 8 | * @var resource Curl resource instance. | ||
| 9 | */ | ||
| 10 | private $ch = null; | ||
| 11 | |||
| 12 | /** | ||
| 13 | * Creates a new Curl entity. | ||
| 14 | */ | ||
| 15 | 12 | public function __construct() | |
| 19 | |||
| 20 | /** | ||
| 21 | * Set an array of options. | ||
| 22 | * | ||
| 23 | * @param array $options | ||
| 24 | */ | ||
| 25 | 1 | public function setOptArray(array $options) | |
| 29 | |||
| 30 | /** | ||
| 31 | * Return the curl error number. | ||
| 32 | * | ||
| 33 | * @return int | ||
| 34 | */ | ||
| 35 | 1 | public function errno() | |
| 39 | |||
| 40 | /** | ||
| 41 | * Return the curl error message. | ||
| 42 | * | ||
| 43 | * @return string | ||
| 44 | */ | ||
| 45 | public function error() | ||
| 49 | |||
| 50 | /** | ||
| 51 | * Send a curl request. | ||
| 52 | * | ||
| 53 | * @return mixed | ||
| 54 | */ | ||
| 55 | 1 | public function execute() | |
| 59 | |||
| 60 | /** | ||
| 61 | * Get curl info. | ||
| 62 | * | ||
| 63 | * @param $name | ||
| 64 | * | ||
| 65 | * @return mixed | ||
| 66 | */ | ||
| 67 | 1 | public function getInfo($name) | |
| 71 | |||
| 72 | /** | ||
| 73 | * Close the resource connection to curl. | ||
| 74 | */ | ||
| 75 | 1 | public function close() | |
| 79 | } | ||
| 80 |