2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
2008-02-25 03:10:37 +01:00
|
|
|
|
2008-01-08 07:37:50 +01:00
|
|
|
/**
|
2008-02-25 03:10:37 +01:00
|
|
|
* @package sapphire
|
|
|
|
* @subpackage cron
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base class invoked from CLI rather than the webserver (Cron jobs, handling email bounces)
|
|
|
|
* @package sapphire
|
|
|
|
* @subpackage cron
|
|
|
|
*/
|
2007-07-19 12:40:28 +02:00
|
|
|
abstract class CliController extends Controller {
|
|
|
|
function init() {
|
|
|
|
$this->disableBasicAuth();
|
|
|
|
parent::init();
|
|
|
|
}
|
|
|
|
|
|
|
|
function index() {
|
|
|
|
foreach( ClassInfo::subclassesFor( $this->class ) as $subclass ) {
|
|
|
|
echo $subclass;
|
|
|
|
|
|
|
|
$task = new $subclass();
|
|
|
|
$task->process();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function process() {}
|
|
|
|
}
|
|
|
|
?>
|