* * 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:----vlipwd7i/Q1EO9kgQ6jTnu8FWnebx4gOH6aSr05mRtI2C8J5+ThgaJpoN6mKcwhy0nz/+MoicBzfXd/ymvAgLuoKHA4jUuLfvJZVqMFmn6wmJH/ZA5+xxsGjlaBLniY1HN7bmzFHuErya5jhAbdg4L1AMZ/I0nsAIH2s9sXoYohH6SojsklWEOs+UJgvfz2N2E9qVFhnaXMe/sJr8LDv+6EgazFlGheCg+C3KKqqcOiTfp7LsHT53q0eFqGS7O8gtlQdFep6kcXy2iVSOUGNzZmeHS0TEK3iJlfIUvM3ksAlIx/2uIkFOzqSUb4B8IIe7kjnbljVXU7bcHm6+lBZV+qa16idaV0fBu6sRYrKVTiwLqhWEFuHvuNxpK0qdxZz9nN608VRE2dsGaKNzBV3JCibYj3IQ+xa6V69avsMy8ZLwLkS6RyAFHLuWGgNYgV3Zt2/otYMvRy1AfBSkYj/oiER1c5vKjDHfftNJLp5II9DH6uiUeBXBsCp6Q0lllzRR4tqjOe3kuewiT+LLIdOAV9nh8JVqi87Iscyvr8tB3+ZTqkHsAhp9YnEuzReDlwrKW1Q2K0zO1gfTFF1czKQSEEL9IprxMslKx8bpXnWcrlJG3jTBTsOo3+MBy8ACxna8ShxSlei/dopTUJXEP/VUw600v/VIQu+5BnFD0mDL4Q=----ATTACHMENT:----NTg1MjU0NDYwMDM2OTIyMyA1MTI3OTE4NTA0NDk2NTAwIDgwNDc3MzAzNzQ5ODA3MA==