Example #1
0
/**
 * This function dispatches the task at issue to the respective function.
 */
function donations_main($caveID, $caves)
{
    // initialize controller
    $controller = NULL;
    // get current task
    $task = Request::getVar('task', 0);
    switch ($task) {
        default:
        case 'Index':
            require_once 'modules/Donations/controller/Index.php';
            $controller = new Donations_Index_Controller();
            break;
    }
    return $controller === NULL ? '' : $controller->execute($caveID, $caves);
}
Example #2
0
/**
 * This function dispatches the task at issue to the respective function.
 */
function donations_main($caveID, $caves)
{
    global $params;
    // initialize controller
    $controller = NULL;
    // get current task
    $task = $params->POST->task;
    switch ($task) {
        default:
        case 'Index':
            require_once 'modules/Donations/controller/Index.php';
            $controller = new Donations_Index_Controller();
            break;
    }
    return $controller === NULL ? '' : $controller->execute($caveID, $caves);
}