1 | <?php |
||
11 | class Tag extends AbstractBaseHtmlTagObject implements TagInterface |
||
12 | { |
||
13 | /** |
||
14 | * The tag name. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | private $tag; |
||
19 | |||
20 | /** |
||
21 | * The tag attributes. |
||
22 | * |
||
23 | * @var \drupol\htmltag\Attributes\AttributesInterface |
||
24 | */ |
||
25 | private $attributes; |
||
26 | |||
27 | /** |
||
28 | * The tag content. |
||
29 | * |
||
30 | * @var mixed[]|null |
||
31 | */ |
||
32 | private $content; |
||
33 | |||
34 | /** |
||
35 | * The attributes factory. |
||
36 | * |
||
37 | * @var \drupol\htmltag\Attributes\AttributesFactoryInterface |
||
38 | */ |
||
39 | private $attributesFactory; |
||
40 | |||
41 | /** |
||
42 | * Tag constructor. |
||
43 | * |
||
44 | * @param \drupol\htmltag\Attributes\AttributesFactoryInterface $attributesFactory |
||
45 | * The attributes factory. |
||
46 | * @param string $name |
||
47 | * The tag name. |
||
48 | */ |
||
49 | 6 | public function __construct(AttributesFactoryInterface $attributesFactory, $name) |
|
55 | |||
56 | /** |
||
57 | * @param string $name |
||
58 | * @param array $arguments |
||
59 | * |
||
60 | * @return \drupol\htmltag\Tag\TagInterface |
||
61 | */ |
||
62 | 1 | public static function __callStatic($name, array $arguments = []) |
|
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | 1 | public function __toString() |
|
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | 2 | public function attr($name = null, ...$value) |
|
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | 2 | public function content(...$content) |
|
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | 5 | public function render() |
|
116 | |||
117 | /** |
||
118 | * Render the tag content. |
||
119 | * |
||
120 | * @return string |
||
121 | */ |
||
122 | 2 | private function renderContent() |
|
146 | } |
||
147 |