Reputation: 8216
I'm trying to use yiic to run an action that's inside a controller (protected/controllers/site.php)
class SiteController extends Controller {
public function actionHello() {
echo 'hello!';
}
}
If I try to run (inside protected/ folder) ./yiic site hello
It says it only has the commands message, migrate, shell and webapp.
How do I call this action within the Command Line ?
Upvotes: 0
Views: 69
Reputation: 5955
Short answer. You can't :-) You need to create Yii an override of CConsoleCommand (more info on the Yii guide here).
Once you've done that, then you create an action (or shift your code right over to that action).
Upvotes: 1