All,
Not sure if this is the right place to put in an OO question, but here it is!
I've been using OO for several years, but still count myself a noobie!
I use OO in PHP files.
So I have a main objects file with this code:
Code:
class my_modules {
function __construct() {
} // end function __construct
} // end class my_modules
Which I call in my process file with:
Code:
$my_mods = new my_modules();
Now I found these great data processing object files, so trying to link them and
use them. Not sure about the right including and calling syntax, so proposing
using this and need feedback on whether this is right way to do this.
Code:
include_once ( 'data_io,php' );
include_once ( 'data_format,php' );
include_once ( 'data_grid,php' );
class my_modules {
function __construct() {
$this->dio = new data_io ();
$this->dfm = new data_format ();
$this->dgd = new data_grid ();
} // end function __construct
} // end class my_modules
And then calling with:
Code:
$my_mods = new my_modules();
$my_dio = new my_mods->dio();
$my_dfm = new my_mods->dfm();
$my_dgd = new my_mods->dgd();
So what corrections are needed for this to work right?
Cheers!
TBNK