Jump to content
Pauldro

Processwire loading custom classes

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...