rybosome
rybosome

Reputation: 5126

Force autoloading of a class without having the name

I'd like to have access to all classes that are in the context of my currently executing script. Unfortunately, the framework I am using is aggressive with its use of autoloading, and purposely defers loading of classes along the execution path.

How can I, without knowing the names of classes, force all classes that have a registered _autoload() function to either load, so that I can access them with get_declared_classes, or get their names?

Upvotes: 2

Views: 539

Answers (1)

Charles Sprayberry
Charles Sprayberry

Reputation: 7853

Well, if the autoload functions were added to spl_autoload_register() you should look at spl_autoload_functions().


Alternatively you could force the invocation of all registered autoloaders with spl_autoload_call().

Upvotes: 1

Related Questions