title: Unable to use load method to call multiple class getters and setters
body: <p>I have three classes, which are Profile, Dish &amp; Template. Profile grabs all the custom post type profiles, the Dish grabs all the custom post type dishes and my Template class is used as a "middle man" for both to render templates.</p>
  
  <p><strong>Template (Class)</strong>:</p>
  
  <pre><code>public static function load($profile, $path)
  {
      ob_start();
      require $_SERVER['DOCUMENT_ROOT'] . Template::PATH_FROM_DOCUMENT_ROOT . '/' . $path . '.php';
      return ob_get_clean();
  }
  </code></pre>
  
  <p><strong>Both output methods in each (Profile, Dish) class is defined as such</strong>:</p>
  
  <pre><code>public function output()
  {
      return Template::load($this, 'dish-gallery'); // dish-gallery/profile-card
  }
  </code></pre>
  
  <p>There are two template files called: <code>dish-gallery.php</code> &amp; <code>profile-card.php</code> - Inside my <code>profile-card.php</code>, I'm able to call the getters and setters using <code>$profile-&gt;</code> as shown below:
  <a href="https://i.stack.imgur.com/aLwhC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aLwhC.png" alt="enter image description here"></a></p>
  
  <p>When I attempt to call <code>$dish-&gt;</code> inside my dish template, I can't target it at all:
  <a href="https://i.stack.imgur.com/RXROc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RXROc.png" alt="enter image description here"></a></p>
  
  <p>Here is the link to the three full classes: <a href="https://paiza.io/projects/ssyYbkspBjLgXd8RBTg9Rw" rel="nofollow noreferrer">https://paiza.io/projects/ssyYbkspBjLgXd8RBTg9Rw</a> - I believe my issue has to do with the $profile parameter inside the load method, <code>var_dump(Template::load($this, 'dish-gallery'))</code> returns both templates perfectly, <strong>the problem that I'm having is that I can't call my Dish getters and setters.</strong></p>
  
  <p><strong>Former question that has helped me pave the way</strong>: <a href="https://stackoverflow.com/questions/59923831/return-a-classes-load-method-using-oop">Return a classes load method using OOP</a></p>