| 1 | <?php |
||
| 10 | class TransactionOutput extends Serializable implements TransactionOutputInterface |
||
| 11 | { |
||
| 12 | use FunctionAliasArrayAccess; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string|int |
||
| 16 | */ |
||
| 17 | private $value; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var ScriptInterface |
||
| 21 | */ |
||
| 22 | private $script; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Initialize class |
||
| 26 | * |
||
| 27 | * @param int $value |
||
| 28 | * @param ScriptInterface $script |
||
| 29 | */ |
||
| 30 | 510 | public function __construct($value, ScriptInterface $script) |
|
| 31 | { |
||
| 32 | |||
| 33 | 510 | $this->value = $value; |
|
| 34 | 510 | $this->script = $script; |
|
| 35 | 510 | $this |
|
| 36 | 510 | ->initFunctionAlias('value', 'getValue') |
|
| 37 | 510 | ->initFunctionAlias('script', 'getScript'); |
|
| 38 | 510 | } |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @return void |
||
| 42 | */ |
||
| 43 | public function __clone() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @see TransactionOutputInterface::getValue() |
||
| 50 | */ |
||
| 51 | 396 | public function getValue() |
|
| 55 | |||
| 56 | /** |
||
| 57 | * @see TransactionOutputInterface::getScript() |
||
| 58 | */ |
||
| 59 | 384 | public function getScript() |
|
| 63 | |||
| 64 | /** |
||
| 65 | * @param TransactionOutputInterface $output |
||
| 66 | * @return bool |
||
| 67 | */ |
||
| 68 | 12 | public function equals(TransactionOutputInterface $output) |
|
| 77 | |||
| 78 | /** |
||
| 79 | * @see \BitWasp\Bitcoin\SerializableInterface::getBuffer() |
||
| 80 | */ |
||
| 81 | 300 | public function getBuffer() |
|
| 85 | } |
||
| 86 |