note 84384 deleted from language.oop5.typehinting by cmb
| From: | cmb@php.net | Date: | Sat, 10 Dec 2016 11:42:28 +0000 |
| Subject: | note 84384 deleted from language.oop5.typehinting by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208437@lists.php.net to get a copy of this message | ||
Note Submitter: madness
----
I must admit that Daniel's implementation is quite awesome (after all we'd be omonyms if I
was english, omen nomen ;-) ), for everyone that already has a function/class to handle errors, this
is a quick method to integrate the TypeHint class:
<?php
public static function handleError($errno, $errstr, $errfile, $errline){
// Implements just-in-time classes for broad type hinting
if (TypeHint::handleTypehint($errno, $errstr)){
return true;
}
// do your usual stuff here
/*
* ...
*/
}
?>
The initializeHandler method and the Typehint::initializeHandler(); call are rendered useless in
this case. Enjoy.