| 1 | <?php |
||
| 17 | class Token { |
||
| 18 | /** |
||
| 19 | * Type of token |
||
| 20 | * |
||
| 21 | * @var integer |
||
| 22 | */ |
||
| 23 | private $type; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Value of token |
||
| 27 | * |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | private $value; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Constructor |
||
| 34 | * @param string|array $data |
||
| 35 | */ |
||
| 36 | public function __construct($data) |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Get the type of token |
||
| 54 | * |
||
| 55 | * @return integer |
||
| 56 | */ |
||
| 57 | public function getType() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Get value of token |
||
| 64 | * |
||
| 65 | * @return string |
||
| 66 | */ |
||
| 67 | public function getValue() |
||
| 71 | |||
| 72 | /** |
||
| 73 | * String representation |
||
| 74 | * |
||
| 75 | * @return integer |
||
| 76 | */ |
||
| 77 | public function asString() { |
||
| 80 | |||
| 81 | } |