码迷,mamicode.com
首页 > Web开发 > 详细

using components in Cakephp 2+ Shell

时间:2016-08-24 11:18:14      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:



 1 <?php
 2 App::uses(‘AppShell‘, ‘Console/Command‘);
 3 App::uses(‘ComponentCollection‘, ‘Controller‘);
 4 App::uses(‘Controller‘, ‘Controller‘);
 5 App::uses(‘MTurkComponent‘, ‘Controller/Component‘);
 6 
 7 class ProcessCompletedTask extends Shell {
 8     public function execute() {
 9         $this->out("Processing...\n");
10         $collection = new ComponentCollection();
11         $this->MTurk = new MTurkComponent($collection);
12         $controller = new Controller();
13         $this->MTurk->initialize($controller);
14 
15         $this->MTurk->processHITs();
16         $this->out("Complete\n");
17     }
18 }

 

原文出处: using components in Cakephp 2+ Shell


using components in Cakephp 2+ Shell

标签:

原文地址:http://www.cnblogs.com/wscrlhs/p/5801899.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!