Using spl_autoload_register with classes that require an argument upon instantiation
-
07-11-2019 - |
Question
I'm trying to use spl_autoload_register() to automatically require my files for me. Unfortunately one of my classes requires an argument upon instantiation...eg:
$foo = new foo('foo');
Is there any way to pass an argument to a classes __construct() method with spl_autoload_register()?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow