| 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 | * @var |
||
| 23 | */ |
||
| 24 | private $outputScript; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * WitnessProgram constructor. |
||
| 28 | * @param int $version |
||
| 29 | * @param BufferInterface $program |
||
| 30 | */ |
||
| 31 | 101 | public function __construct($version, BufferInterface $program) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @param BufferInterface $program |
||
| 39 | * @return WitnessProgram |
||
| 40 | */ |
||
| 41 | 4 | public static function v0(BufferInterface $program) |
|
| 51 | |||
| 52 | /** |
||
| 53 | * @return int |
||
| 54 | */ |
||
| 55 | 91 | public function getVersion() |
|
| 59 | |||
| 60 | /** |
||
| 61 | * @return BufferInterface |
||
| 62 | */ |
||
| 63 | 90 | public function getProgram() |
|
| 67 | |||
| 68 | /** |
||
| 69 | * @return ScriptInterface |
||
| 70 | */ |
||
| 71 | 6 | public function getScript() |
|
| 79 | } |
||
| 80 |