Implement register_autoload_handler() builtin function, that registers any number of autoloaders, enabling for classes to be automatically loaded if they are not defined.
Implement a mechanism, to iterate through registered autoload callbacks until class is found.
This commit is contained in:
1
ph7int.h
1
ph7int.h
@@ -1277,6 +1277,7 @@ struct ph7_vm {
|
||||
SySet aPaths; /* Set of import paths */
|
||||
SySet aIncluded; /* Set of included files */
|
||||
SySet aOB; /* Stackable output buffers */
|
||||
SySet aAutoLoad; /* Stack of class autoload callbacks */
|
||||
SySet aShutdown; /* Stack of shutdown user callbacks */
|
||||
SySet aException; /* Stack of loaded exception */
|
||||
SySet aIOstream; /* Installed IO stream container */
|
||||
|
Reference in New Issue
Block a user