title: php Creating default object from empty value?
body: <p>ok what im trying to do is makeing something so i can call it like
  <code>$this-&gt;model-&gt;users-&gt;getInfomation('name');</code> or something similer on my framework
  but php give me a <strong><em>strict standards Creating default object from empty value</em></strong></p>
  
  <pre><code>protected function model($model)
  {
      $path = "features". DS ."models". DS . $model .".php";
      require $path;
  
      $class = 'Model'. ucfirst($model);
      $this-&gt;model-&gt;$model = new $class;
  }
  </code></pre>
  
  <p>can we make it so it will somehow fit in the standards ? </p>
  
  <p>edit*</p>
  
  <p>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 </p>
  
  <pre><code>protected function model($model)
  {
      $path = "features". DS ."models". DS . $model .".php";
      require $path;
  
      $class = 'Model'. ucfirst($model);
      $this-&gt;$model = new $class;
  }
  </code></pre>
  
  <p><em>yes the above code works fine</em> <code>$this-&gt;blog-&gt;getSomething();</code>, but somehow i want to make them in a group, like the question above, so if we want to get something like <code>$this-&gt;model-&gt;blog-&gt;getSomething();</code> </p>
  
  <p>Thanks for the time.</p>
  
  <p>Adam Ramadhan</p>