Perforce Chronicle 2012.2/486814
API Documentation

Cron_IndexController Class Reference

Processes application's periodic tasks. More...

List of all members.

Public Member Functions

 indexAction ()
 Run cron to process application's periodic tasks.

Public Attributes

 $contexts

Detailed Description

Processes application's periodic tasks.

Copyright:
2011-2012 Perforce Software. All rights reserved
License:
Please see LICENSE.txt in top-level folder of this distribution.
Version:
2012.2/486814

Member Function Documentation

Cron_IndexController::indexAction ( )

Run cron to process application's periodic tasks.

    {
        // explicitly set json context as thats all we provide
        $this->contextSwitch->initContext('json');

        // if background is set, close the session early but
        // continue running the cron checks and tasks
        $background = $this->getRequest()->getParam('background');
        if ($background) {
            $this->getHelper('browserDisconnect')->disconnect(null, 0);
        } else {
            // force json context
            $this->contextSwitch->initContext('json');
        }

        // run cron and pass returned report to the view
        $this->view->report = Cron_Model_Cron::run();
    }

Member Data Documentation

Cron_IndexController::$contexts
Initial value:
 array(
        'index' => array('json')
    )

The documentation for this class was generated from the following file: