简体   繁体   English

如何检测模型属于cakephp中的哪个插件?

[英]how to detect model belongs to which plugin in cakephp?

How to detect in AppModel, model that is loaded, belong to which plug-in? 如何在AppModel中检测到,加载的模型属于哪个插件?

EDIT: 编辑:

When I check model name or other details in AppModel, there is no difference between the model loaded from the main program and a model that within the plugin loaded. 当我检查AppModel中的模型名称或其他详细信息时,从主程序加载的模型与加载的插件中的模型之间没有区别。 I need to know if model belongs to the plugin to do some operation on it. 我需要知道模型是否属于插件才能对其进行一些操作。

You can find the name of your model being used by checking the Model::name property. 您可以通过检查Model :: name属性找到正在使用的模型的名称。 It gets set for you. 它为您设置。

If that's not what you're after, please edit your question. 如果那不是您想要的,请编辑您的问题。 Your objective is a little unclear. 您的目标还不清楚。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CakePHP-通过存储在第一个数组所属的另一个模型中的ID的序列化数组对模型的记录进行排序 - CakePHP - Sorting a model's records by a serialized array of ids stored in another model to which the first array belongs to CakePHP用插件中的模型替换应用程序模型 - CakePHP replace app model with model from plugin 如何检查cakephp-2.3中的控制器使用的是哪种模型? - How to check which model is using by a controller in cakephp-2.3? 如何访问.tpl文件中的数据库数据,该文件属于prestashop 1.6中的另一个控制器/模型? - How can I access DB data in a .tpl file which belongs to another controller/model in prestashop 1.6? 如何检测属于美国特定州的 IP - How to detect an ip belongs to a particular state of USA 控制器如何在插件中调用模型? (cakephp 2.x(2.6))(应用程序->插件-> PluginName->控制器) - how can controller call model in plugin? (cakephp 2.x(2.6)) (app -> plugin -> PluginName -> Controller) 使用具有HABTM模型的模型进行CakePHP分页 - CakePHP Pagination with a model which has a HABTM model CakePhp 2.x - 未加载插件模型 - CakePhp 2.x - plugin model is not being loaded CakePHP插件:ACL或Auth无法加载模型关联? - CakePHP Plugin: ACL or Auth not loading model associations? Cakephp连接查询属于 - Cakephp join query Belongs to
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM