Get information about the incoming HTTP request.

/sprout/Controllers/AdminController.php Highlighted file source
Line 50: use Sprout\Helpers\Request;
Line 83: if (! Sprout::ipaddressInArray(Request::userIp(), $whitelist)) {
Line 194: $result = AdminAuth::checkRateLimit($_POST['Username'], Request::userIp());
Line 213: AdminAuth::saveLoginAttempt($_POST['Username'], Request::userIp(), $result === true ? 1 : 0);
Line 1084: if (Request::isAjax()) {
Line 1195: if (Request::isAjax()) {
Line 1378: if (Request::isAjax()) {
Line 1519: if (Request::isAjax()) {
Line 1720: if (Request::isAjax()) {

/sprout/core/Kohana.php Highlighted file source
Line 75: * For security, this function also destroys the $_REQUEST global variable.
Line 804: $description = 'A database error occurred while performing the requested procedure.';
Line 821: $message = 'One of the database records for the page you requested could not be found.';
Line 1067: * @return string i18n language string, or the requested key if the i18n item is not found
Line 1156: // Requested key was found
Line 1162: // Requested key is not set

/sprout/Helpers/Cors.php Highlighted file source
Line 25: * TODO support for max-age, caching 'options' requests
Line 41: 'x-requested-with',
Line 50: 'upgrade-insecure-requests',
Line 68: 'access-control-request-headers',
Line 69: 'access-control-request-method',
Line 74: * Handling a CORS request.
Line 99: $headers = Request::getHeaders();
Line 100: $method = Request::method();
Line 106: $method = strtolower(@$headers['access-control-request-method'] ?: '');
Line 107: $headers = explode(',', @$headers['access-control-request-headers'] ?: '');
Line 142: // Browsers don't like to show the contents on a bad CORS request.
Line 156: header('Vary: origin,access-control-request-headers,access-control-request-method');
Line 162: // An options request stops here, sends 'no content'.
Line 163: $method = Request::method();

/sprout/Helpers/Csrf.php Highlighted file source
Line 18: * Protection against Cross Site Request Forgery (CSRF) attacks
Line 58: // Clearly invalid request, avoid any exceptions being generated
Line 87: * This is intended for use on JavaScript requests that require CSRF protection.

/sprout/Helpers/HttpReq.php Highlighted file source
Line 23: * Simple HTTP(s) request wrapper
Line 37: * Make a simple GET request.
Line 54: * Make a simple POST request, with optional data
Line 57: * @param string $url The URL to send a POST request to
Line 72: * Make a HTTP request. Returns the response content.
Line 74: * The request options array accepts the following keys:
Line 79: * @param string $url The URL to request.
Line 80: * @param array $opts Request options array.
Line 81: * @param string/array $data Request data, for POST requests.
Line 107: * Sends a HTTP request using fopen (i.e. file_get_contents)
Line 143: * Sends a HTTP request using cURL.
Line 177: curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $opts['method']);
Line 237: * Performs a request while permitting advanced cURL options to be specified.
Line 242: * @param string $method The HTTP request method, e.g. 'POST', 'GET', etc. Case sensitive.
Line 243: * @param string|array $post_data Data for a POST/PUT request, other request types should leave this null.
Line 279: curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
Line 331: * Return the http status code ofthe last request
Line 333: * @return int The HTTP status code of the last request
Line 342: * Return info of the last request
Line 353: * Return headers of the last request

/sprout/Helpers/Request.php Highlighted file source
Line 23: * Get information about the incoming HTTP request.
Line 25: class Request
Line 31: // Content types from client's HTTP Accept request header (array)
Line 59: * Returns the current request protocol, based on $_SERVER['https']. In CLI
Line 80: * Tests if the current request is an AJAX request by checking the X-Requested-With HTTP
Line 81: * request header that most popular JS frameworks now set for AJAX calls.
Line 87: return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) AND strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest');
Line 91: * Returns current request method.
Line 93: * @throws Kohana_Exception in case of an unknown request method
Line 98: $method = strtolower($_SERVER['REQUEST_METHOD']);
Line 100: if ( ! in_array($method, Request::$http_methods))
Line 101: throw new Kohana_Exception('request.unknown_method', $method);
Line 136: Request::parseAcceptHeader();
Line 139: return Request::$accept_types;
Line 141: return (Request::acceptsAtQuality($type, $explicit_check) > 0);
Line 163: $mime_types[$type] = Request::acceptsAtQuality($type, $explicit_check);
Line 188: Request::parseAcceptHeader();
Line 202: $q2 = Request::acceptsAtQuality($type, $explicit_check);
Line 213: if (isset(Request::$accept_types[$type[0]][$type[1]]))
Line 214: return Request::$accept_types[$type[0]][$type[1]];
Line 217: if ($explicit_check === FALSE AND isset(Request::$accept_types[$type[0]]['*']))
Line 218: return Request::$accept_types[$type[0]]['*'];
Line 221: if ($explicit_check === FALSE AND isset(Request::$accept_types['*']['*']))
Line 222: return Request::$accept_types['*']['*'];
Line 229: * Parses client's HTTP Accept request header, and builds array structure representing it.
Line 236: if (Request::$accept_types !== NULL)
Line 240: Request::$accept_types = array();
Line 246: Request::$accept_types['*']['*'] = 1;
Line 267: if ( ! isset(Request::$accept_types[$type[0]][$type[1]]) OR $q > Request::$accept_types[$type[0]][$type[1]])
Line 269: Request::$accept_types[$type[0]][$type[1]] = $q;
Line 309: } // End request

/sprout/Helpers/Router.php Highlighted file source
Line 31: /** The original URI requested e.g. by a HTTP user agent or via CLI */
Line 34: /** Original query string requested by HTTP user agent */
Line 131: $e = array(400 => '400 Bad Request', 401 => '401 Unauthorized', 403 => '403 Forbidden', 500 => '500 Internal Server Error');
Line 238: $old_proto = Request::protocol();
Line 297: $method = Request::method();

/sprout/Helpers/SessionStats.php Highlighted file source
Line 24: * Should tracking be done? Determined at request start time
Line 54: // Only track non-ajax GET requests
Line 55: if (Request::isAjax()) return false;
Line 56: if (Request::method() != 'get') return false;
Line 82: $referrer = Request::referrer();
Line 129: * Auto-generate UTM params based on the initial request referrer
Line 246: * from the most recent request which contained this parameter
Line 248: * @return string UTM request source, e.g. 'google', 'bing', 'facebook', etc
Line 258: * from the most recent request which contained this parameter
Line 260: * @return string UTM request medium, e.g. 'cpc', 'organic', 'social', 'email', etc
Line 270: * from the most recent request which contained this parameter
Line 272: * @return string UTM request campaign, e.g. 'spring_sale'
Line 282: * from the most recent request which contained this parameter
Line 284: * @return string UTM request term, e.g. 'running shoes'
Line 294: * from the most recent request which contained this parameter
Line 296: * @return string UTM request term, e.g. 'logolink' or 'textlink'

/sprout/i18n/en_US/core.php Highlighted file source
Line 17: 'there_can_be_only_one' => 'There can be only one instance of Kohana per page request',
Line 22: 'resource_not_found' => 'The requested %s, %s, could not be found',
Line 23: 'invalid_filetype' => 'The requested filetype, .%s, is not allowed in your view configuration file',
Line 26: 'no_controller' => 'Kohana was not able to determine a controller to process this request: %s',
Line 27: 'page_not_found' => 'The page you requested, %s, could not be found.',
Line 31: 'generic_error' => 'Unable to Complete Request',
A total of 179 lines in 38 files were found