好吧,问题几乎就在于标题。我已经阅读了文档,但是找不到如何将功能注册到我的ORM配置中。
这里有什么帮助吗?谢谢!
编辑:好的,我已经按照Sam所说的做了,并做了我自己的课并注册为
'numeric_functions' => array(
'LOG10' => 'Admin\Model\Log10',
),
但是它找不到类并给出错误
在第3322行的C:\ webserver \ apache \ htdocs \ test \ vendor \ doctrine \ orm \ lib \ Doctrine \ ORM \ Query \ Parser.php中找不到类'Admin \ Model \ Log10'
知道为什么会这样吗?
实际上,@ foozy给您的链接就是您所需要的。您只需扩展doctrine
配置数组:
return array(
'doctrine' => array(
'connection' => array(
'orm_default' => array(
// Foo
)
),
'configuration' => array(
'orm_default' => array(
'numeric_functions' => array(
'MD5' => 'DoctrineExtensions\Query\Mysql\Md5'
),
'datetime_functions' => array(),
'string_functions' => array(),
'metadata_cache' => 'filesystem',
'query_cache' => 'filesystem',
'result_cache' => 'filesystem',
)
)
)
);
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句