I have a SHELL file in cakephp as below:
<?php
class AtualizarIndicadoresNormaisShell extends AppShell {
public function atualizar() {
//Chama model e sua action
ClassRegistry::init('DadoIndicadoresNormal')->atualizarIndicadoresNormais();
}
}
It calls the model below in updatingNormal ():
<?php
App::uses('AppModel', 'Model');
class DadoIndicadoresNormal extends AppModel {
...
function atualizarIndicadoresNormais() {
App::import('Controller', 'DadosIndicadoresNormais');
$atualizar = new DadosIndicadoresNormaisController;
$atualizar->cronAtualizar();
}
}
In it I call a controller action called cronUpdate ().
Inside the Controller Action, how do I display a message through the Shell? I used it as below but it returns error. Because it only works inside the Shell file. Can you help me? Or if you have how to save an error log.
$this->out