| 1 |
<?php |
| 2 |
/** |
| 3 |
* @file |
| 4 |
* @license https://opensource.org/licenses/Apache-2.0 Apache-2.0 |
| 5 |
*/ |
| 6 |
|
| 7 |
namespace Wikimedia\CSS\Parser; |
| 8 |
|
| 9 |
/** |
| 10 |
* Read data for the CSS parser |
| 11 |
*/ |
| 12 |
interface DataSource { |
| 13 |
|
| 14 |
public const EOF = ''; |
| 15 |
|
| 16 |
/** |
| 17 |
* Read a character from the data source. |
| 18 |
* |
| 19 |
* @return string One UTF-8 character, or self::EOF |
| 20 |
*/ |
| 21 |
public function readCharacter(); |
| 22 |
|
| 23 |
/** |
| 24 |
* Push a character back onto the stream. |
| 25 |
* |
| 26 |
* @param string $char One UTF-8 character |
| 27 |
*/ |
| 28 |
public function putBackCharacter( $char ); |
| 29 |
} |