Hi,
I have this class to read a configfile. Found it around on the internet. It saves the different var's of the configfile as $this->name_in_configfile.
This is fine. However, I now want to build a super class which would, among other things, hold those variables. The super class would hold all stuff typical to the site (partly from the configfile, partly from other sources).
It is not a real inherited class, I don't need anything else but the var's from the config class.
what I am looking for is a way of storing all variables (unknown number, unknown names) of the type
$config->var_out_of_configfile
as
$site->identical_name
Something will would do like this
class site {
$config = new Config("configfile_name");
// this automatically parses all names from configfile as $config->name1, $config->anothername, ...
// now look throught all varialbes (HOW DO I?)
and set
$this->name1 = $config->name1
etc.
Do you know what I mean ?
Get all var's of $config and get them into $this...