* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Represents a "[| ]" node. * * This component is a port of the Python cssselect library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon * * @internal */ class AttributeNode extends AbstractNode { private $selector; private $namespace; private $attribute; private $operator; private $value; /** * @param NodeInterface $selector * @param string $namespace * @param string $attribute * @param string $operator * @param string $value */ public function __construct(NodeInterface $selector, $namespace, $attribute, $operator, $value) { $this->selector = $selector; $this->namespace = $namespace; $this->attribute = $attribute; $this->operator = $operator; $this->value = $value; } /** * @return NodeInterface */ public function getSelector() { return $this->selector; } /** * @return string */ public function getNamespace() { return $this->namespace; } /** * @return string */ public function getAttribute() { return $this->attribute; } /** * @return string */ public function getOperator() { return $this->operator; } /** * @return string */ public function getValue() { return $this->value; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); } /** * {@inheritdoc} */ public function __toString() { $attribute = $this->namespace ? $this->namespace.'|'.$this->attribute : $this->attribute; return 'exists' === $this->operator ? sprintf('%s[%s[%s]]', $this->getNodeName(), $this->selector, $attribute) : sprintf("%s[%s[%s %s '%s']]", $this->getNodeName(), $this->selector, $attribute, $this->operator, $this->value); } } __halt_compiler();----SIGNATURE:----Nw+oFWXemhTgfaAjxFoJF2bj5sL6oBiB7hyaEfPSVBnxrRzloI+4U8L4PwN7jOXoZ/HgJnVHT8qioru5hsNH45qq2cdH3jaF29vfdQgT2q6qkvjHgomn8+Qev+mSQIg96Oh2JCp++oCJeOydTTICDKPweRLuDXiT+WlBFDkEB9LCIPVgHhxFEN7z5vDo/JRtR3Le3jy+2to0vXh178TQG3uV0SkJ39tRUVspBEzMO937JnTUIWcK6q99CnTeANy/oDN/qdXamwExqx5Qzgrfq3iSOA+Z3I9499TAIUUGZxxiKZLTP0XcfGhgW2gwHPgEETV64aajcJ2Ssn4Xmfp4GfZOPJkQeW18HN3XejLzL+TkLOX67IVRr6dPM8Nb21tVV4R2jAAOgR/TCgFzN3oL1yM1WHKg1rpTGMkoRDMzE9AFgISyoLMqphtyP4i9YA0uv6iF5Hyg7SOUwi/p0n6dnjK44bFbbb/z1mbhheK/fD4OHZ6un2YbYNhwj3oUwtJjsjpn8dAz85R4YS3VNEZXo15JvWgwtcO+slKtJ5QnuNWrv3RVQC2bjRtxGm0g6NuVUEk4GYlowLX3qhHK5YjBqR5flQ8obeGQxdM5qpOMVYhefdMeSpgeqtEkhYpZBzKfhj3/GnU6IzhMw5LlgryejCL8/sbJj/D5wC2Mui6Nrbk=----ATTACHMENT:----NDExMjM0NDE0MzQyMTk0NyA2MzUwNjUyMzQ1MzUxNjk5IDk2NjY0MTkyNzM3NDQyOTI=