1 | <?php namespace BestServedCold\PhalueObjects\Access; |
||
6 | final class Curl extends ValueObject |
||
7 | { |
||
8 | public $connectTimeout = CURLOPT_CONNECTTIMEOUT; |
||
9 | public $followRedirects = CURLOPT_FOLLOWLOCATION; |
||
10 | public $headers = CURLOPT_HEADER; |
||
11 | public $maxRedirects = CURLOPT_MAXREDIRS; |
||
12 | public $noBody = CURLOPT_NOBODY; |
||
13 | public $returnTransfer = CURLOPT_RETURNTRANSFER; |
||
14 | public $timeout = CURLOPT_TIMEOUT; |
||
15 | |||
16 | private $options = []; |
||
17 | |||
18 | public function __construct($value) |
||
26 | |||
27 | public function exec() |
||
31 | |||
32 | private function init() |
||
40 | |||
41 | public function getOptions() |
||
45 | |||
46 | public function getOption($option) |
||
50 | |||
51 | /** |
||
52 | * @param $option |
||
53 | * @param bool|true $value |
||
54 | * @return $this |
||
55 | */ |
||
56 | public function setOption($option, $value = true) |
||
64 | |||
65 | public function errorNumber() |
||
69 | |||
70 | public function error() |
||
74 | |||
75 | public function info() |
||
79 | |||
80 | public function __destruct() |
||
84 | } |
||
85 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.