Pauldro Posted January 12, 2017 Share Posted January 12, 2017 Hello, I've been using processwire to make ecomm websites, and web applications, and so far I love it. It's a breath of fresh air all the tools I have at my disposal. Now my question is, I have custom classes that don't extend any Processwire classes. Is there a way I can include them for Processwire to autoload for me? How would I go about this in 3.0, in 2.8 I just have _init.php add them. Do I use namespacing? How would I go about that? Sorry for the many questions, I'm a novice. Thank you in advance. Link to comment Share on other sites More sharing options...
LostKobrakai Posted January 12, 2017 Share Posted January 12, 2017 For your own classes nothing has to change. You can use your own includes / autoloading. ProcessWire 3.0/2.8 does have psr4 autoloading capabilities and you could use composer to autoload/include things like you could in 2.8. Link to comment Share on other sites More sharing options...
Pauldro Posted January 12, 2017 Author Share Posted January 12, 2017 Is there a tutorial on how to load my classes with the autoloading, because I'm totally lost. I'm new to composer, and I don't know anyway to load my classes automatically. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now