function SafeAnalysisNodeVisitor::getSafe
Return value
array
1 call to SafeAnalysisNodeVisitor::getSafe()
- SafeAnalysisNodeVisitor::leaveNode in vendor/
twig/ twig/ src/ NodeVisitor/ SafeAnalysisNodeVisitor.php - Called after child nodes are visited.
File
-
vendor/
twig/ twig/ src/ NodeVisitor/ SafeAnalysisNodeVisitor.php, line 43
Class
- SafeAnalysisNodeVisitor
- @internal
Namespace
Twig\NodeVisitorCode
public function getSafe(Node $node) {
$hash = spl_object_hash($node);
if (!isset($this->data[$hash])) {
return [];
}
foreach ($this->data[$hash] as $bucket) {
if ($bucket['key'] !== $node) {
continue;
}
if (\in_array('html_attr', $bucket['value'])) {
$bucket['value'][] = 'html';
}
return $bucket['value'];
}
return [];
}