| 1 | <?php |
||
| 19 | class Context implements ContextInterface, \Countable |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var TypeNameInterface |
||
| 23 | */ |
||
| 24 | private $current; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var \SplStack|TypeNameInterface[] |
||
| 28 | */ |
||
| 29 | private $stack; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var Readable |
||
| 33 | */ |
||
| 34 | private $file; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Context constructor. |
||
| 38 | * @param Readable $file |
||
| 39 | */ |
||
| 40 | public function __construct(Readable $file) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return Readable |
||
| 49 | */ |
||
| 50 | public function getFile(): Readable |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return TypeNameInterface |
||
| 57 | */ |
||
| 58 | public function current(): TypeNameInterface |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return int |
||
| 65 | */ |
||
| 66 | public function count(): int |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @param TypeNameInterface $name |
||
| 73 | * @return TypeNameInterface |
||
| 74 | */ |
||
| 75 | public function create(TypeNameInterface $name): TypeNameInterface |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @return TypeNameInterface |
||
| 86 | */ |
||
| 87 | public function close(): TypeNameInterface |
||
| 95 | } |
||
| 96 |