1
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 on updateIndicationsNormals():
<?php
App::uses('AppModel', 'Model');
class DadoIndicadoresNormal extends AppModel {
...
function atualizarIndicadoresNormais() {
App::import('Controller', 'DadosIndicadoresNormais');
$atualizar = new DadosIndicadoresNormaisController;
$atualizar->cronAtualizar();
}
}
Here I call a controller action named cronAtualize().
Within Controller Action, how do I display a message through Shell? I used as below but returns error. Because it only works inside the Shell file. Can you help me? Or if you have an error log.
$this->out