V
V
Valery Rusin2013-01-31 14:46:06
Yii
Valery Rusin, 2013-01-31 14:46:06

Strange job include?

I have created a Yii console application. In the config, I specified import as needed.

'import' => array(<br>
        'application.models.*',<br>
        'application.forms.*',<br>
        'application.components.*',<br>
        'application.validators.*',<br>
    ),<br>

I am getting an error on this line.
public function actionDequeue()<br>
  {<br>
    $smsTask = SmsTasks::getReadyTask();<br>

Fatal error: Class 'SmsTasks' not found in D:\xampp\htdocs\local\newlk\protected\commands\SmsCommand.php on line 15<br>

And I see that a new empty file D:\xampp\htdocs\local\newlk\protected\SmsTasks.php is being created
When the web application is launched, it finds all classes. include path in console and web is the same
.;D:\xampp\htdocs\local\newlk\protected\validators;<br>
D:\xampp\htdocs\local\newlk\protected\components;<br>
D:\xampp\htdocs\local\newlk\protected\forms;<br>
D:\xampp\htdocs\local\newlk\protected\models;<br>
\xampp\php\PEAR<br>

Please help me understand this behaviour.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question