Zend framework 对于简单类,在new className()上出现奇怪的令人困惑的Zend/Doctrine错误

Zend framework 对于简单类,在new className()上出现奇怪的令人困惑的Zend/Doctrine错误,zend-framework,doctrine,Zend Framework,Doctrine,我很困惑,希望这里有人有线索 我想我有Zend的1.x条令 我创建了一个相当简单的记录类型: class MYAPP_Model_CustomerContactRequest extends Doctrine_Record { /** * Set table definition */ public function setTableDefinition() { $this->setTableName('my_table_name');

我很困惑,希望这里有人有线索

我想我有Zend的1.x条令

我创建了一个相当简单的记录类型:

class MYAPP_Model_CustomerContactRequest extends Doctrine_Record
{
    /**
     * Set table definition
     */
    public function setTableDefinition()
    {
    $this->setTableName('my_table_name');
    $this->hasColumn('id', 'integer', 4, array(
         'type' => 'integer',
         'length' => 4,
         'unsigned' => 0,
         'primary' => true,
         'autoincrement' => true,
         ));
    $this->hasColumn('customerEmail', 'string', 255, array(
         'type' => 'string',
         'length' => 255,
         'fixed' => false,
         'primary' => false,
         'notnull' => true,
         'autoincrement' => false,
         ));
    $this->hasColumn('vendorID',  'integer', 4, array(
         'type' => 'integer',
         'length' => 4,
         'unsigned' => 0,
         'primary' => false,
         'notnull' => true,
         'autoincrement' => false,
         ));
    $this->hasColumn('contactStatus',  'integer', 4, array(
         'type' => 'integer',
         'length' => 4,
         'unsigned' => 0,
         'primary' => false,
         'autoincrement' => false,
         ));
    }
    Other member funcs ...
}
没什么大不了的

我有一个表单可以发送vendorID和customerEmail数据。没什么大不了的

按下按钮可正确触发控制器中的提交操作。嗯

但是提交操作正在崩溃,给了我死亡的白色屏幕,甚至没有错误消息。在这一点上我很困惑

提交操作内容如下:

    public function submitAction(){

    try {
        $request = new MYAPP_Model_CustomerContactRequest();
    }
    catch (Zend_Exception $e) {
        echo "Caught exception: " . get_class($e) . "\n";
        echo "Message: " . $e->getMessage() . "\n";
    }

    /*
    $request = new MYAPP_Model_CustomerContactRequest();
    $request->customerEmail = $_GET['custEmail'];
    $request->vendorID =$this->_targetExpertID;
    $request->contactStatus = 1;
    $request->save();
    */
}
如您所见,我已经注释掉了实际的记录保存,我只是尝试实例化模型类

我一定错过了一些明显的或真正黑暗神秘的东西。这里似乎没有足够的数据导致错误

删除该声明: $request=newknowbees\u Model\u CustomerContactRequest(); ... 从try子句来看没有区别

如果我注释掉了实例化,我将继续进入响应页面,好像一切都很好

这对你有什么建议吗?我被难住了。

!!$@!$$$@

这是一个路径问题

我吃了!#!#路径中的CustomerContactRequest.php文件:

BASE_DIR\application\modules\MYAPP\models\CustomerContactRequest\CustomerContactRequest.php
。。。而不是

BASE_DIR\application\modules\MYAPP\models\CustomerContactRequest.php
.
还有!!$!$类名

MYAPP_Model_CustomerContactRequest
。。。意味着定义就在models目录下

一旦我移动了文件,整个愚蠢的事情就发生了

=======

我对没有收到加载器的错误消息深感愤慨!这个明显的愚蠢错误严重地缩短了我今晚的饮酒时间

希望这篇文章有一天能帮助别人

@#@$#@$#$#$#