Page 1 of 1

helper files in component

Posted: Fri Mar 14, 2008 7:14 am
by madsamurai
I can't seem to find any documentation about how to properly include helper files in J1.5 components. Is it as simple as a require_once() statement? Do the classes in the helper file require any special naming convention, and can there be more than one class in a helper file, or do I need a helper file for each class? And finally, how is the helper and it's classes instantiated in the script? Basically, I have a number of functions I need to re-use in multiple areas of my component, and also I have some special-purpose, non-joomla classes I need to import.

Also, along the same line of thought, I would like to import a config.php file, similar to the main configuration.php, in my component (primarily because I need to set some paths differently for my local development and live webserver). I just need a list of variable declarations. I'm sure this is done in the same way as helper files, but haven't had any luck getting it to work in my experimentations.

Thanks