cakephp $uses 插件部分

发布于 2024-10-31 01:03:31 字数 491 浏览 1 评论 0原文

我正在学习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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦里°也失望 2024-11-07 01:03:31

在此页面上查看 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...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文