| 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 | 190 | public function __construct($version, BufferInterface $program) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @param BufferInterface $program |
||
| 43 | * @return WitnessProgram |
||
| 44 | */ |
||
| 45 | 20 | public static function v0(BufferInterface $program) |
|
| 55 | |||
| 56 | /** |
||
| 57 | * @return int |
||
| 58 | */ |
||
| 59 | 170 | public function getVersion() |
|
| 63 | |||
| 64 | /** |
||
| 65 | * @return BufferInterface |
||
| 66 | */ |
||
| 67 | 168 | public function getProgram() |
|
| 71 | |||
| 72 | /** |
||
| 73 | * @return ScriptInterface |
||
| 74 | */ |
||
| 75 | 26 | public function getScript() |
|
| 83 | } |
||
| 84 |