XF 2.0 How to include PHP code in Addon?

Hello!

I have a very basic question about XenForo addons.
I downloaded some PHP code from the Internet, which I want to use in my addon.
The code has several constants and global functions and some classes in several php files and they are related by the use of require statement.
How should include them in my addon so that I can access them?

Best regards,
Tommi
 
I would assume you would dump it in the addon folder and make sure you set up the namespaces correct in those files so that you can access them. I am pretty sure you would need to modify those files to set up correct namespaces on them so that they can be used.
 
Top Bottom