Jump to content

Modules or Classes?


gar1606
 Share

Recommended Posts

I would prefer module because it's more PW way. 

It worth to mention that there is WireMail module that handles sending of email in PW. Also, there is WireMail SMTP that extends mentioned class.

You can go with a similar approach: create a module that will extend WireMail class by hooks where you can specify some specific things from your custom mail class.

 

  • Like 2
Link to comment
Share on other sites

In general I'd say build classes as independent as possible from processwire and to integrate it in PW just add a module as wrapper around your class, which does tie any processwire specifics (hook / module config / process interface / …) into what your class does on it's own. 

  • Like 4
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...