1 | <?php |
||
12 | class PayToPubkeyHash |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var BufferInterface |
||
17 | */ |
||
18 | private $hash; |
||
19 | |||
20 | 2 | /** |
|
21 | * @var bool |
||
22 | 2 | */ |
|
23 | 2 | private $verify; |
|
24 | |||
25 | /** |
||
26 | * PayToPubkeyHash constructor. |
||
27 | * @param $opcode |
||
28 | 2 | * @param BufferInterface $hash160 |
|
29 | 2 | * @param bool $allowVerify |
|
30 | 2 | */ |
|
31 | public function __construct($opcode, BufferInterface $hash160, $allowVerify = false) |
||
49 | |||
50 | /** |
||
51 | * @param Operation[] $chunks |
||
52 | 2 | * @param bool $allowVerify |
|
53 | * @return static |
||
54 | 2 | */ |
|
55 | public static function fromDecodedScript(array $chunks, $allowVerify = false) |
||
70 | |||
71 | /** |
||
72 | * @param ScriptInterface $script |
||
73 | * @param bool $allowVerify |
||
74 | * @return PayToPubkeyHash |
||
75 | */ |
||
76 | public static function fromScript(ScriptInterface $script, $allowVerify = false) |
||
80 | |||
81 | public function getType() |
||
85 | |||
86 | /** |
||
87 | * @return int |
||
88 | */ |
||
89 | public function getRequiredSigCount() |
||
93 | |||
94 | /** |
||
95 | * @return int |
||
96 | */ |
||
97 | public function getKeyCount() |
||
101 | |||
102 | /** |
||
103 | * @return bool |
||
104 | */ |
||
105 | public function isChecksigVerify() |
||
109 | |||
110 | /** |
||
111 | * @param PublicKeyInterface $publicKey |
||
112 | * @return bool |
||
113 | */ |
||
114 | public function checkInvolvesKey(PublicKeyInterface $publicKey) |
||
118 | |||
119 | /** |
||
120 | * @return BufferInterface |
||
121 | */ |
||
122 | public function getPubKeyHash() |
||
126 | } |
||
127 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: