ok what im trying to do is makeing something so i can call it like
$this->model->users->getInfomation('name');
or something similer on my framework
but php give me a strict standards Creating default object from empty value
protected function model($model)
{
$path = "features". DS ."models". DS . $model .".php";
require $path;
$class = 'Model'. ucfirst($model);
$this->model->$model = new $class;
}
can we make it so it will somehow fit in the standards ?
edit*
this function is in class Application so i can extend them from our controller like blog Extends Application then call something like $this->model->blog will get something like what im doing above, when i do something like
protected function model($model)
{
$path = "features". DS ."models". DS . $model .".php";
require $path;
$class = 'Model'. ucfirst($model);
$this->$model = new $class;
}
yes the above code works fine $this->blog->getSomething();
, but somehow i want to make them in a group, like the question above, so if we want to get something like $this->model->blog->getSomething();
Thanks for the time.
Adam Ramadhan