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 | 498 | public function __construct($value, ScriptInterface $script) |
|
31 | { |
||
32 | |||
33 | 498 | $this->value = $value; |
|
34 | 498 | $this->script = $script; |
|
35 | 498 | $this |
|
36 | 498 | ->initFunctionAlias('value', 'getValue') |
|
37 | 498 | ->initFunctionAlias('script', 'getScript'); |
|
38 | 498 | } |
|
39 | |||
40 | /** |
||
41 | * @return void |
||
42 | */ |
||
43 | public function __clone() |
||
47 | |||
48 | /** |
||
49 | * @see TransactionOutputInterface::getValue() |
||
50 | */ |
||
51 | 384 | public function getValue() |
|
55 | |||
56 | /** |
||
57 | * @see TransactionOutputInterface::getScript() |
||
58 | */ |
||
59 | 372 | public function getScript() |
|
63 | |||
64 | /** |
||
65 | * @param TransactionOutputInterface $output |
||
66 | * @return bool |
||
67 | 300 | */ |
|
68 | public function equals(TransactionOutputInterface $output) |
||
77 | |||
78 | /** |
||
79 | * @see \BitWasp\Bitcoin\SerializableInterface::getBuffer() |
||
80 | */ |
||
81 | public function getBuffer() |
||
85 | } |
||
86 |