| 1 | <?php |
||
| 19 | abstract class State implements StateInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var mixed |
||
| 23 | */ |
||
| 24 | private $result; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var bool |
||
| 28 | */ |
||
| 29 | private $resolved = false; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var Runtime |
||
| 33 | */ |
||
| 34 | private $runtime; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * State constructor. |
||
| 38 | * @param Runtime $runtime |
||
| 39 | */ |
||
| 40 | public function __construct(Runtime $runtime) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return Reflection |
||
| 47 | */ |
||
| 48 | public function getReflection(): Reflection |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param OpcodeInterface $opcode |
||
| 55 | * @return mixed |
||
| 56 | */ |
||
| 57 | abstract protected function execute(OpcodeInterface $opcode); |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param OpcodeInterface $opcode |
||
| 61 | * @return mixed |
||
| 62 | */ |
||
| 63 | final public function resolve(OpcodeInterface $opcode) |
||
| 72 | } |
||
| 73 |