Unable to execute user-defined CConsoleCommand on Linux machine

Hi guys,

I am newbie to yii -framework and specially its commands -concept. I have defined a new class called DoitCommand extending the CConsoleCommand class, the code of which, is as follows;




<?php

public class DoitCommand extends CConsoleCommand

{

    public function actionIndex() {

	echo "hello";

    {

}

?>

I have placed the above class into protected/commands folder. I exported yii/framework to path, thanks to which, yiic gets recognized when typing it to command prompt, after which, I get the following output.


Yii command runner (based on Yii v1.1.14)

Usage: /var/www/yii/framework/yiic <command-name> [parameters...]



No matter what I type in I am not able to get my newly created DoitCommand class recognized by yiic. Inside /protected/commands folder I have typed in yiic help, yiic doit index etc, but I only manage to get the following commands…

The following commands are available:

  • message

  • migrate

  • shell

  • webapp

Have I misundestood something? How am I able to execute the DoitCommand by yiic on my linux machine?

Br Janne