1 | <?php |
||
21 | class Result |
||
22 | { |
||
23 | protected $urlInfo; |
||
24 | protected $statusCode; |
||
25 | protected $responseTime; |
||
26 | protected $handlerError; |
||
27 | |||
28 | /** |
||
29 | * Constructor. |
||
30 | * |
||
31 | * @param UrlInfo $urlInfo |
||
32 | * @param string $statusCode |
||
33 | * @param float $responseTime |
||
34 | * @param string $handlerError Get a string error from the handler |
||
35 | */ |
||
36 | public function __construct(UrlInfo $urlInfo, $statusCode, $responseTime, $handlerError = null) |
||
37 | { |
||
38 | $this->urlInfo = $urlInfo; |
||
39 | $this->statusCode = $statusCode; |
||
40 | $this->responseTime = $responseTime; |
||
41 | $this->handlerError = $handlerError; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * getUrl. |
||
46 | * |
||
47 | * @return UrlInfo |
||
48 | */ |
||
49 | public function getUrl() |
||
50 | { |
||
51 | return $this->urlInfo; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * getStatusCode. |
||
56 | * |
||
57 | * @return int |
||
58 | */ |
||
59 | public function getStatusCode() |
||
63 | |||
64 | /** |
||
65 | * getReponseTime. |
||
66 | * |
||
67 | * @return float |
||
68 | */ |
||
69 | public function getReponseTime() |
||
73 | |||
74 | /** |
||
75 | * getHandlerError. |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getHandlerError() |
||
83 | } |
||
84 |