title: Overriding Doctrine_Record (sfDoctrineRecord) instance methods in Doctrine PHP Symfony
body: <p>My background is in Propel, so I was hoping it would be a simple thing to override a magical getter in a Doctrine_Record (sfDoctrineRecord), but I'm getting either a Segfault or the override method is simply ignored in favor of the one in the superclass.</p>
  
  <p><a href="https://gist.github.com/697008eaf4d7b606286a" rel="noreferrer">https://gist.github.com/697008eaf4d7b606286a</a></p>
  
  <pre><code>class FaqCategory extends BaseFaqCategory
  {
  
    public function __toString()
    {
      return $this-&gt;getCategory();
    }
  
    // doesn't work
    // override getDisplayName to fall back to category name if getDisplayName doesn't exist
    public function getDisplayName() {
  
      // also tried parent::getDisplayName() but got segfault(!)
      if(isset($this-&gt;display_name)) {
        $display_name = $this-&gt;display_name;
      } else {
        $display_name = $this-&gt;category;
      }
  
      return $display_name;
  
    }
  
  }
  </code></pre>
  
  <p>What is the proper Doctrine way to extend/override methods on an instance of Doctrine_Record (via sfDoctrineRecord extends Doctrine_Record)? This has to be doable...or should I be looking at the Template documentation?</p>
  
  <p>Thanks,
  Brian</p>