1 | <?php |
||
20 | class Error implements \JsonSerializable |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $format; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | private $args; |
||
31 | |||
32 | /** |
||
33 | * @param string $format |
||
34 | * @param array $args |
||
35 | */ |
||
36 | public function __construct($format, array $args = []) |
||
41 | |||
42 | /** |
||
43 | * @inheritdoc |
||
44 | */ |
||
45 | public function __get($name) |
||
57 | |||
58 | /** |
||
59 | * @inheritdoc |
||
60 | */ |
||
61 | public function __toString() |
||
65 | |||
66 | /** |
||
67 | * @inheritdoc |
||
68 | */ |
||
69 | function jsonSerialize() |
||
73 | } |
||
74 |
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.