@@ 60-73 (lines=14) @@ | ||
57 | /** |
|
58 | * {@inheritdoc} |
|
59 | */ |
|
60 | public function addMeta($name, $content) |
|
61 | { |
|
62 | if (is_array($content)) { |
|
63 | $content = array_map(function ($content) use ($name) { |
|
64 | return static::getHtmlMeta($name, $content); |
|
65 | }, array_filter($content)); |
|
66 | } elseif (!empty($content)) { |
|
67 | $content = static::getHtmlMeta($name, $content); |
|
68 | } else { |
|
69 | return; |
|
70 | } |
|
71 | ||
72 | $this[$name] = $content; |
|
73 | } |
|
74 | ||
75 | /** |
|
76 | * {@inheritdoc} |
|
@@ 78-91 (lines=14) @@ | ||
75 | /** |
|
76 | * {@inheritdoc} |
|
77 | */ |
|
78 | public function addLink($rel, $href) |
|
79 | { |
|
80 | if (is_array($href)) { |
|
81 | $href = array_map(function ($href) use ($rel) { |
|
82 | return static::getHtmlLink($rel, $href); |
|
83 | }, array_filter($href)); |
|
84 | } elseif (!empty($href)) { |
|
85 | $href = static::getHtmlLink($rel, $href); |
|
86 | } else { |
|
87 | return; |
|
88 | } |
|
89 | ||
90 | $this[$rel] = $href; |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * Adds an array of metas. |