What way should I use to load a file from a module?
I am writing a module which is divided into 3 parts
- Custom core will be in the module which contains basic functions required for project
Custom notification section will handle the notifications to show on site (It has a section on site where user can see all notifications.)
Custom mail will handle mail (Users will get email on each activity.)
So I have now a module file and 2 include files, but I am confused on how to include them in .module file.
There are 3 different methods available, but I am not sure which one is best and what the major differences between them are.
require_once drupal_get_path('module', 'custom_module')
files = mail.inc
module_load_include('inc', 'custom_module', 'mail.inc')
I tried them, and they all are working fine for now; I don't have much experience to guess future issues.