1 | <?php |
||
12 | class ErrorResult implements ResultInterface { |
||
13 | |||
14 | const NOT_FOUND = 'NOT_FOUND'; |
||
15 | |||
16 | public $code; |
||
17 | public $text; |
||
18 | public $format; |
||
19 | |||
20 | /** |
||
21 | * @param $error |
||
22 | */ |
||
23 | function __construct($error) |
||
29 | |||
30 | /** |
||
31 | * @param $text |
||
32 | */ |
||
33 | public function text($text) |
||
37 | |||
38 | /** |
||
39 | * @param $format |
||
40 | */ |
||
41 | public function format($format) |
||
45 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.