1 | <?php |
||
23 | class BindingException extends StanzaException |
||
24 | { |
||
25 | /** |
||
26 | * Construct the exception. Note: The message is NOT binary safe. |
||
27 | * |
||
28 | * @param Jid $jid |
||
29 | * @param Error $error |
||
30 | * @param Exception $previous [optional] The previous exception used for the exception chaining. Since 5.3.0 |
||
31 | * @return static |
||
32 | * @since 5.1.0 |
||
33 | */ |
||
34 | public static function fromError(Jid $jid, Error $error, Exception $previous = null) |
||
42 | |||
43 | private static function _conditionDescription(Error $error) |
||
54 | } |
||
55 |
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: