| 1 | <?php |
||
| 19 | abstract class BaseToken implements TokenInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * The offset of the token in the expression. |
||
| 23 | * |
||
| 24 | * @var int |
||
| 25 | */ |
||
| 26 | protected $offset; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * The value of the token. |
||
| 30 | * |
||
| 31 | * @var mixed |
||
| 32 | */ |
||
| 33 | protected $value; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Returns the offset of the token in the expression. |
||
| 37 | * |
||
| 38 | * @return int |
||
| 39 | * The offset of the token. |
||
| 40 | */ |
||
| 41 | public function getOffset() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Returns the value of the token. |
||
| 48 | * |
||
| 49 | * @return mixed |
||
| 50 | * The value of the token. |
||
| 51 | */ |
||
| 52 | public function getValue() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Constructs a new TokenBase object. |
||
| 59 | * |
||
| 60 | * @param int $offset |
||
| 61 | * The offset of the token in the string. |
||
| 62 | * @param mixed $value |
||
| 63 | * The value of the token. |
||
| 64 | */ |
||
| 65 | public function __construct($offset, $value) |
||
| 70 | } |
||
| 71 |