wp-user-avatar
/
third-party
/
vendor
/
sabberworm
/
php-css-parser
/
src
/
Parsing
Last commit date
Anchor.php
2 months ago
OutputException.php
2 months ago
ParserState.php
2 months ago
SourceException.php
2 months ago
UnexpectedEOFException.php
2 months ago
UnexpectedTokenException.php
2 months ago
Anchor.php
35 lines
| 1 | <?php |
| 2 | |
| 3 | namespace ProfilePressVendor\Sabberworm\CSS\Parsing; |
| 4 | |
| 5 | /** |
| 6 | * @internal since 8.7.0 |
| 7 | */ |
| 8 | class Anchor |
| 9 | { |
| 10 | /** |
| 11 | * @var int |
| 12 | */ |
| 13 | private $iPosition; |
| 14 | /** |
| 15 | * @var \Sabberworm\CSS\Parsing\ParserState |
| 16 | */ |
| 17 | private $oParserState; |
| 18 | /** |
| 19 | * @param int $iPosition |
| 20 | * @param \Sabberworm\CSS\Parsing\ParserState $oParserState |
| 21 | */ |
| 22 | public function __construct($iPosition, ParserState $oParserState) |
| 23 | { |
| 24 | $this->iPosition = $iPosition; |
| 25 | $this->oParserState = $oParserState; |
| 26 | } |
| 27 | /** |
| 28 | * @return void |
| 29 | */ |
| 30 | public function backtrack() |
| 31 | { |
| 32 | $this->oParserState->setPosition($this->iPosition); |
| 33 | } |
| 34 | } |
| 35 |