cakephp $uses 插件部分
我正在学习cakephp,我有这个代码,它出现在一个名为testifying的文件夹中的插件文件夹中,在testifying插件下,在控制器中有一个名为dispatch_controller.php的文件
当我打开dispatch_controller.php时,我有这个
var $uses = array('TestifyinItem', 'Customer','Audio','User','Testifying.Profile','Analytics.Statistic','Cron.CronJob');
现在我在该文件夹中找不到 TestifyinItem,但是当我转到 app/models 时,我找到了 Testifying_item.php。 我在任何文件夹中都找不到 CronJob,但插件中有一个名为 cron_job 的文件夹,并且其中有一个名为 CronJob 的类.... 我想我对在哪里找到什么以及如何找到感到困惑。
任何帮助将不胜感激
I am learning cakephp and I have this code that is appearently in a plugin folder in a folder called testifying and under the testifying plugin, in the controllers there is a file called dispatch_controller.php
When I opened the dispatch_controller.php I have this
var $uses = array('TestifyinItem', 'Customer','Audio','User','Testifying.Profile','Analytics.Statistic','Cron.CronJob');
Now I couldnt find TestifyinItem in that folder but when I went to app/models I found Testifying_item.php.
I couldnt find CronJob in any folder but there is a folder in plugins named cron_job and has a class called CronJob in it....
I think I am confused as to where to find what and how.
any help will be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在此页面上查看 Cake 的命名约定:
http://book.cakephp。 org/view/509/Coding-Standards#Variables-609
你会看到文件名应该是小写,单词之间用下划线分隔;而类名则应采用驼峰命名法。
希望这将帮助您了解 cron_job 和 CronJob 之间的关系。我同意 Cake 的惯例一开始需要一些时间来适应,不过……
Check out Cake's naming conventions on this page:
http://book.cakephp.org/view/509/Coding-Standards#Variables-609
You will see that file names should be in lower case, with words separated by underscores; while class names should be written in CamelCase.
Hopefully this will help you understand how cron_job and CronJob are related. I agree that Cake's conventions take a little getting used to at first, though...