/opt/alt/php55/usr/share/pear/Symfony/Component/CssSelector/Node
NameSizeModeActions
AbstractNode.php9200644editdlrm
AttributeNode.php26350644editdlrm
ClassNode.php15190644editdlrm
CombinedSelectorNode.php19920644editdlrm
ElementNode.php16060644editdlrm
FunctionNode.php20750644editdlrm
HashNode.php15000644editdlrm
NegationNode.php16340644editdlrm
NodeInterface.php9200644editdlrm
PseudoNode.php15860644editdlrm
SelectorNode.php16840644editdlrm
Specificity.php15630644editdlrm
Edit: /opt/alt/php55/usr/share/pear/Symfony/Component/CssSelector/Node/FunctionNode.php (2075B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; use Symfony\Component\CssSelector\Parser\Token; /** * Represents a ":()" node. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class FunctionNode extends AbstractNode { /** * @var NodeInterface */ private $selector; /** * @var string */ private $name; /** * @var Token[] */ private $arguments; /** * @param NodeInterface $selector * @param string $name * @param Token[] $arguments */ public function __construct(NodeInterface $selector, $name, array $arguments = array()) { $this->selector = $selector; $this->name = strtolower($name); $this->arguments = $arguments; } /** * @return NodeInterface */ public function getSelector() { return $this->selector; } /** * @return string */ public function getName() { return $this->name; } /** * @return Token[] */ public function getArguments() { return $this->arguments; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); } /** * {@inheritdoc} */ public function __toString() { $arguments = implode(', ', array_map(function (Token $token) { return "'".$token->getValue()."'"; }, $this->arguments)); return sprintf('%s[%s:%s(%s)]', $this->getNodeName(), $this->selector, $this->name, $arguments ? '['.$arguments.']' : ''); } }