123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace Symfony\Components\CssSelector;
- /*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- /**
- * Token represents a CSS Selector token.
- *
- * This component is a port of the Python lxml library,
- * which is copyright Infrae and distributed under the BSD license.
- *
- * @package Symfony
- * @subpackage Components_CssSelector
- * @author Fabien Potencier <fabien.potencier@symfony-project.com>
- */
- class Token
- {
- protected $type;
- protected $value;
- protected $position;
- public function __construct($type, $value, $position)
- {
- $this->type = $type;
- $this->value = $value;
- $this->position = $position;
- }
- public function __toString()
- {
- return (string) $this->value;
- }
- public function isType($type)
- {
- return $this->type == $type;
- }
- public function getPosition()
- {
- return $this->position;
- }
- }
|