Signals the object to do no more loop cycles.
After the actual call to self::doLoopCycle() has finished self::onBreakLoop() will be called.
Tags:
You need to implement this method with your loop code.
This method is called periodicly until self::breakLoop() is called.
Important is, that after self::breakLoop() this method runs until it returns. If you want to break out from your loop method directly after setting the demaon to break the loop, you need to return:
// some work ...
if ($something) {
// We break out imediately.
// some other work will not be executed
self::breakLoop();
return;
}
if ($somethingElse) {
// We only break the loop.
// This method will not be executed anymore.
// But some other work will be executed the last time!
self::breakLoop();
}
// some other work ...
}
Tags:
Overwrite this method to hook the pre loop phase.
This method is called first before the loop. But after Console_Application_Abstract::setUp().
Tags:
Template method from Console_Application_Abstract.
This method runs the method doLoopCycle() which you must implement in your deamon class implementation.
Tags:
Overrides
Console_Application_Abstract::run() (You need to implement this method. Put your stuff to do here.)