<small id='kcnu8'></small><noframes id='kcnu8'>

      <legend id='kcnu8'><style id='kcnu8'><dir id='kcnu8'><q id='kcnu8'></q></dir></style></legend>
    1. <tfoot id='kcnu8'></tfoot>

    2. <i id='kcnu8'><tr id='kcnu8'><dt id='kcnu8'><q id='kcnu8'><span id='kcnu8'><b id='kcnu8'><form id='kcnu8'><ins id='kcnu8'></ins><ul id='kcnu8'></ul><sub id='kcnu8'></sub></form><legend id='kcnu8'></legend><bdo id='kcnu8'><pre id='kcnu8'><center id='kcnu8'></center></pre></bdo></b><th id='kcnu8'></th></span></q></dt></tr></i><div id='kcnu8'><tfoot id='kcnu8'></tfoot><dl id='kcnu8'><fieldset id='kcnu8'></fieldset></dl></div>
        <bdo id='kcnu8'></bdo><ul id='kcnu8'></ul>
    3. 在 Doctrine PHP Symfony 中覆盖 Doctrine_Record (sfDoctrineRecord

      Overriding Doctrine_Record (sfDoctrineRecord) instance methods in Doctrine PHP Symfony(在 Doctrine PHP Symfony 中覆盖 Doctrine_Record (sfDoctrineRecord) 实例方法)

      1. <legend id='TuO8P'><style id='TuO8P'><dir id='TuO8P'><q id='TuO8P'></q></dir></style></legend>
        <i id='TuO8P'><tr id='TuO8P'><dt id='TuO8P'><q id='TuO8P'><span id='TuO8P'><b id='TuO8P'><form id='TuO8P'><ins id='TuO8P'></ins><ul id='TuO8P'></ul><sub id='TuO8P'></sub></form><legend id='TuO8P'></legend><bdo id='TuO8P'><pre id='TuO8P'><center id='TuO8P'></center></pre></bdo></b><th id='TuO8P'></th></span></q></dt></tr></i><div id='TuO8P'><tfoot id='TuO8P'></tfoot><dl id='TuO8P'><fieldset id='TuO8P'></fieldset></dl></div>

            <bdo id='TuO8P'></bdo><ul id='TuO8P'></ul>
            • <tfoot id='TuO8P'></tfoot>
                <tbody id='TuO8P'></tbody>

                <small id='TuO8P'></small><noframes id='TuO8P'>

              • 本文介绍了在 Doctrine PHP Symfony 中覆盖 Doctrine_Record (sfDoctrineRecord) 实例方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我的背景是 Propel,所以我希望在 Doctrine_Record (sfDoctrineRecord) 中覆盖一个神奇的 getter 是一件简单的事情,但是我得到了一个 Segfault 或者覆盖方法被简单地忽略了超类中的一个.

                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.

                https://gist.github.com/697008eaf4d7b606286a

                class FaqCategory extends BaseFaqCategory
                {
                
                  public function __toString()
                  {
                    return $this->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->display_name)) {
                      $display_name = $this->display_name;
                    } else {
                      $display_name = $this->category;
                    }
                
                    return $display_name;
                
                  }
                
                }
                

                在 Doctrine_Record 实例上扩展/覆盖方法的正确 Doctrine 方法是什么(通过 sfDoctrineRecord 扩展 Doctrine_Record)?这必须是可行的...还是我应该查看模板文档?

                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?

                谢谢,布赖恩

                推荐答案

                试试 _get 和 _set 方法.

                Try _get and _set methods.

                这篇关于在 Doctrine PHP Symfony 中覆盖 Doctrine_Record (sfDoctrineRecord) 实例方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
              • <legend id='65UHr'><style id='65UHr'><dir id='65UHr'><q id='65UHr'></q></dir></style></legend>
                <tfoot id='65UHr'></tfoot>
                  <tbody id='65UHr'></tbody>

                    <bdo id='65UHr'></bdo><ul id='65UHr'></ul>

                    1. <small id='65UHr'></small><noframes id='65UHr'>

                      <i id='65UHr'><tr id='65UHr'><dt id='65UHr'><q id='65UHr'><span id='65UHr'><b id='65UHr'><form id='65UHr'><ins id='65UHr'></ins><ul id='65UHr'></ul><sub id='65UHr'></sub></form><legend id='65UHr'></legend><bdo id='65UHr'><pre id='65UHr'><center id='65UHr'></center></pre></bdo></b><th id='65UHr'></th></span></q></dt></tr></i><div id='65UHr'><tfoot id='65UHr'></tfoot><dl id='65UHr'><fieldset id='65UHr'></fieldset></dl></div>