Best way to include an external class

Member

First off just want to say that so far developing with xF has been amazing. Everything just works, and the code is easy to follow, so i just wanted to say thanks to the dev's and keep up the good work.

Now my question..

I have some external pages that i am building, i have created routes and controllers for these, using some xF models as needed etc, all of which is working fine. What i need to do now is include an external class and have access to instantiate this class in the controller so i can get the data it is supposed to collect. What is the best way to load this class. Is there a hook somewhere where i could tell xF to load this class, or is there a specific naming structure which would autoload this class?

Well-known member

You can just call it. XenForo has an auto loader that will include classes as needed. Just note it follows directory structure:
XenForo_ControllerPublic_Forum is found in library/XenForo/ControllerPublic/Forum.php

Member

You can just call it. XenForo has an auto loader that will include classes as needed. Just note it follows directory structure:
XenForo_ControllerPublic_Forum is found in library/XenForo/ControllerPublic/Forum.php