1 | <?php |
||
5 | class ReferenceNumber |
||
6 | { |
||
7 | /** |
||
8 | * Get the pool to use based on the type of prefix hash. |
||
9 | * @param string $type |
||
10 | * @return string |
||
11 | */ |
||
12 | private static function getPool($type = 'alnum') |
||
40 | |||
41 | /** |
||
42 | * Generate a random secure crypt figure. |
||
43 | * @param int $min |
||
44 | * @param int $max |
||
45 | * @return int |
||
46 | */ |
||
47 | private static function secureCrypt($min, $max) |
||
66 | |||
67 | /** |
||
68 | * Finally, generate a hashed token. |
||
69 | * @param int $length |
||
70 | * @return string |
||
71 | */ |
||
72 | public static function getHashedToken($length = 25) |
||
82 | } |
||
83 |
Let’s assume you have a class which uses late-static binding:
}
The code above will run fine in your PHP runtime. However, if you now create a sub-class and call the
getSomeVariable()
on that sub-class, you will receive a runtime error:In the case above, it makes sense to update
SomeClass
to useself
instead: