是否有一种方法可以调用来获取实体的所有映射子类的名称?
Is there a method I can call to obtain the name of all the mapped subclasses of an entity?
这是你想要的吗:
$relations = Doctrine_Core::getTable('<CLASS_NAME>')->getRelations(); foreach($relations as $relation) echo $relation->getClass();
Is this what you want:
执行 $tableClass->getOption("subclasses")
虽然这仅适用于存在鉴别器映射的继承类型。最值得注意的是,您无法通过具体的表继承来获得它。
Do $tableClass->getOption("subclasses")
Although this will only work for types of inheritance where there is a discriminator map. Most notably, you won't get it with concrete table inheritance.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
这是你想要的吗:
Is this what you want:
执行 $tableClass->getOption("subclasses")
虽然这仅适用于存在鉴别器映射的继承类型。最值得注意的是,您无法通过具体的表继承来获得它。
Do $tableClass->getOption("subclasses")
Although this will only work for types of inheritance where there is a discriminator map. Most notably, you won't get it with concrete table inheritance.