public static function handleRequest()
    {
        // save static class
        static::$calledClass = get_called_class();

        // handle JSON requests
        if (static::peekPath() == 'json') {
            // check access for API response modes
            static::$responseMode = static::shiftPath();
            if (in_array(static::$responseMode, ['json','jsonp'])) {
                if (!static::checkAPIAccess()) {
                    return static::throwAPIUnAuthorizedError();
                }
            }
        }

        return static::handleRecordsRequest();
    }
public static function handleRequest()
    {
        // save static class
        static::$calledClass = get_called_class();

        // handle JSON requests
        if (static::peekPath() == 'json') {
            // check access for API response modes
            static::$responseMode = static::shiftPath();
            if (in_array(static::$responseMode, ['json','jsonp'])) {
                if (!static::checkAPIAccess()) {
                    return static::throwAPIUnAuthorizedError();
                }
            }
        }

        return static::handleRecordsRequest();
    }
public static function handleRequest ( ) { // save static class static :: $ calledClass = get_called_class ( ) ; // handle JSON requests if ( static :: peekPath ( ) == 'json' ) { // check access for API response modes static :: $ responseMode = static :: shiftPath ( ) ; if ( in_array ( static :: $ responseMode , [ 'json' , 'jsonp' ] ) ) { if ( ! static :: checkAPIAccess ( ) ) { return static :: throwAPIUnAuthorizedError ( ) ; } } } return static :: handleRecordsRequest ( ) ; }
Start of routing for this controller.
Methods in this execution path will always respond either as an error or a normal response.
Responsible for detecting JSON or JSONP response modes.

@return void
Start of routing for this controller . Methods in this execution path will always respond either as an error or a normal response . Responsible for detecting JSON or JSONP response modes .