| 1 | <?php |
||
| 7 | class WitnessProgram |
||
| 8 | { |
||
| 9 | const V0 = 0; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var int |
||
| 13 | */ |
||
| 14 | private $version; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var BufferInterface |
||
| 18 | */ |
||
| 19 | private $program; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * WitnessProgram constructor. |
||
| 23 | * @param int $version |
||
| 24 | 111 | * @param BufferInterface $program |
|
| 25 | */ |
||
| 26 | 111 | public function __construct($version, BufferInterface $program) |
|
| 31 | |||
| 32 | /** |
||
| 33 | 91 | * @param BufferInterface $program |
|
| 34 | * @return WitnessProgram |
||
| 35 | 91 | */ |
|
| 36 | public static function v0(BufferInterface $program) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return int |
||
| 49 | */ |
||
| 50 | public function getVersion() |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return BufferInterface |
||
| 57 | */ |
||
| 58 | public function getProgram() |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return ScriptInterface |
||
| 65 | */ |
||
| 66 | public function getScript() |
||
| 73 | } |
||
| 74 |