title: PHP access private methods from one child to another
body: <pre><code>class Master{
    protected static $DB;
    function __construct(){
      static::$DB = new DB();
      $view = new View();
    }
  }
  
  class DB extends Master{
    private function ReturnSomeData(){
      return $data;
    }
  }
  
  class View extends Master{
    public function ViewData(){
      $DBdata = static::$DB-&gt;ReturnSomeData();
    }
  }
  </code></pre>
  
  <p>Fatal error: Call to private method DB::ReturnSomeData() from context 'View'</p>
  
  <p>How can I access the ReturnSomeData() method from the View class? Is there something like a 'gateway'?</p>
  
  <pre><code>class Master {
  ... }
  
  class DB extends Master{
  ...
    public function PassItToMe(){
      return $this;
    }
  }
  
  class View extends Master{
    public function ViewData(){
      $DBdata = static::$DB-&gt;PassItToMe()-&gt;ReturnSomeData();
     }
  }
  </code></pre>
  
  <p>This is my picture right now, but I'm really lost. 
  The idea is that I want to access private methods from one child class to another. </p>