I have different classes in which I have different properties. Now I want to instantiate these classes at runtime. Please have a look on my Example. Thank you for your help.
class costumers
{
$ Name;
...
}
class users
{
$ Username;
...
}
class db_helper{
...
public function select (object $table, $columns, $limit, $offset) {
// Instance the object like
$out = new typeof ($table);
}
}
new typeof()? Which of the 2 classes (costumersandusers) are you intent of instantiating within the select function? And, where is this select function declared?$tableis already anObject.... not aClassand therefore you can directly start using$tablewithout instantiating it again.....