学说 2 + Zend Framework 代理生成
我正在尝试将原则 2 与 Zend 框架混合在一起,并且我正在使用 Zend 自动加载器。所以我的所有实体看起来像
TEST/ORM/Entites/User.php
下的 TEST_ORM_Entities_User
但序列化存在问题,因为所有代理都看起来像
Pocks\ ORM\Proxies\TEST_ORM_Entities_UserProxy
下TEST/ORM/Proxies/TEST_ORM_Entities_UserProxy.php
所以 doctine 找不到我的代理类,当我检查我的缓存时,我发现它损坏了
object(__PHP_Incomplete_Class)#175 (19) {
["__PHP_Incomplete_Class_Name"]=>
string(46) "TEST\ORM\Proxies\TEST_ORM_Entities_UserProxy"
任何想法我们如何显式地放置代理文件名,或者解决这个问题?
I am trying to mix doctrine 2 along with Zend framework, and I am using Zend auto loader. so All my Entities is looked like
TEST_ORM_Entities_User
under TEST/ORM/Entites/User.php
but there is a problem with serialization since all proxies will look like
Pocks\ORM\Proxies\TEST_ORM_Entities_UserProxy
under TEST/ORM/Proxies/TEST_ORM_Entities_UserProxy.php
So doctine can't find my proxy classes, and when I check my cache I found it corrupted
object(__PHP_Incomplete_Class)#175 (19) {
["__PHP_Incomplete_Class_Name"]=>
string(46) "TEST\ORM\Proxies\TEST_ORM_Entities_UserProxy"
Any Idea how we can explicitly put the Proxy File Name, or solving this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们过去遇到过同样的问题,最终将我们的应用程序转换为使用命名空间。
我们仍然使用 Zend Framework 1.x 及其伪命名空间约定,但由于 此修复。
现在我们的代码如下所示:
由于自动加载器修复,我们可以在代码中的任何位置通过
Application\Form\UserForm
引用此类!We ran into the same problem in the past, and ended up converting our application to use namespaces as well.
We still use Zend Framework 1.x and its pseudo-namespace convention, but all of our application classes are namespaced thanks to this fix.
Now our code looks like:
And we can refer to this class by
Application\Form\UserForm
anywhere in the code, thanks to the autoloader fix!