title: why I cant call a PHP class and the function into it?
body: <p>I have following php file structure</p>
  
  <ul>
  <li>...index.php </li>
  <li>... ...controllers (FOLDER)</li>
  <li>.....template.controllers.php</li>
  <li>...</li>
  <li>...views (FOLDER)</li>
  <li>.....template.php</li>
  </ul>
  
  <p>index.php</p>
  
  <pre><code>&lt;?php
  
  $template= null;
  require_once "controllers/template.controllers.php";
  $template - new ControladorPlantilla();
  $template -&gt; ctrTraerPlantilla();
  
  ?&gt;
  </code></pre>
  
  <p>template.controllers.php</p>
  
  <pre><code>&lt;?php
  Class ControladorPlantilla {
  public function ctrTraerPlantilla(){
  
  include "views/template.php";
  
  }
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>and I got the following errors</p>
  
  <pre><code>Notice: Object of class ControladorPlantilla could not be converted to int in index.php on line 14
  FATAL ERROR: Uncaught Error: Call to a member function ctrTraerPlantilla() on null in index.php on line 15
  Error: Call to a member function ctrTraerPlantilla() on null in index.php on line 15
  </code></pre>
  
  <p>Im just learning about PHP, thank for your help!</p>