1 | <?php |
||
10 | final class SerializerHandler |
||
11 | { |
||
12 | /** @var SerializerInterface */ |
||
13 | private $serializer; |
||
14 | |||
15 | 17 | function __construct(SerializerInterface $serializer) |
|
19 | |||
20 | /** |
||
21 | * [text arg=val /] |
||
22 | * [text arg=val]content[/text] |
||
23 | * [json arg=val /] |
||
24 | * [json arg=val]content[/json] |
||
25 | * [xml arg=val /] |
||
26 | * [xml arg=val]content[/xml] |
||
27 | * [yaml arg=val /] |
||
28 | * [yaml arg=val]content[/yaml] |
||
29 | * |
||
30 | * @param ShortcodeInterface $shortcode |
||
31 | * |
||
32 | * @return string |
||
33 | */ |
||
34 | 2 | public function __invoke(ShortcodeInterface $shortcode) |
|
38 | } |
||
39 |
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.