title: Why are private methods not working with polymorphism?
body: <p>Kind of got a problem using inheritance/polymorphism with private methods. </p>
  
  <p>Example:</p>
  
  <pre><code>class cmsPage{
  
     private function getBlock(){
         $block = new cmsBlock();
         return $block
     }
  
     function createBlock(){
         $block = $this-&gt;getBlock();
         $block-&gt;save();
     }
     //... do various things
  }
  
  
  class specialCmsPage extends cmsPage{
  
     private function getBlock(){
         $block = new specialCmsBlock();
         return $block
     }
  
  }
  </code></pre>
  
  <p>Naturally I want specialCmsPage to inherit all the methods from cmsPage. The Function <code>getBlock()</code> should make sure all Content Blocks added to specialCmsPage are of type specialCmsBlock and not cmsBlock. </p>
  
  <p>I figured out, that it only works they way I expect it if I remove the "private" from the class methods, but I would prefer to use these, because these methods should not be called from outside a class. 
  Upon using "<strong>private</strong>" in front of the <code>getBlock()</code> method specialCmsPage always receives a cmsBlock Object. </p>
  
  <p>Is there a way to achieve what I want using "<strong>private</strong>"?</p>