'index',
'$TaskName' => 'runTask'
);
function index() {
$tasks = ClassInfo::subclassesFor('BuildTask');
echo "
";
foreach($tasks as $task) {
echo "- $task
";
}
echo "
";
}
function runTask($request) {
echo "Running task...
";
$TaskName = $request->param('TaskName');
if (class_exists($TaskName)) {
$task = new $TaskName();
if (!$task->isDisabled()) $task->run($request);
}
}
}
?>