• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XenForo_Application::autoload vs class_exists


Well-known member
What's the rationale behind using XenForo_Application::autoload() to check if a given class is autoload-able, instead of using a much simpler class_exists('', true) function?

It creates an additional (and unnecessary) dependency on the XenForo_Autoloader class.


Well-known member
Thanks for the reply, Mike. :)

Would it be possible to remove this particular dependency on the autoloader? Please?

As it stands, the XF autoloader doesn't support loading of namespaced classes and multiple library directories. This issue can be easily solved by using a custom autoloader. The real problem arises when trying to use those classes. Pretty much any handler class and every class that utilizes the dynamic proxy system cannot be loaded from any other autoloader due to this hard dependency.