CodeExplorer translateAttribute example
return (bool) ($this->flags &
$flag);
} public function getNodeTranslators(): array
{ return [ 'Selector' =>
$this->
translateSelector(...
),
'CombinedSelector' =>
$this->
translateCombinedSelector(...
),
'Negation' =>
$this->
translateNegation(...
),
'Function' =>
$this->
translateFunction(...
),
'Pseudo' =>
$this->
translatePseudo(...
),
'Attribute' =>
$this->
translateAttribute(...
),
'Class' =>
$this->
translateClass(...
),
'Hash' =>
$this->
translateHash(...
),
'Element' =>
$this->
translateElement(...
),
];
} public function translateSelector(Node\SelectorNode
$node, Translator
$translator): XPathExpr
{ return $translator->
nodeToXPath($node->
getTree());
}