Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • ActionFormModelBase
  • CalendarEventFormModel
  • CallFormModel
  • CreatePageFormModel
  • EditMobileFormsFormModel
  • EventCommentPublisherFormModel
  • EventFormModel
  • EventPublisherFormModel
  • FileSystemObjectDataProvider
  • MassActionFormModel
  • MobilePagination
  • NoteFormModel
  • NotificationsController
  • TimeFormModel
  • UploadLogoFormModel
  • X2FormModel
  • X2HttpRequest
  • Overview
  • Package
  • Class
  • Tree

Class X2HttpRequest

CHttpRequest encapsulates the $_SERVER variable and resolves its inconsistency among different Web servers.

CHttpRequest also manages the cookies sent from and sent to the user. By setting CHttpRequest::$enableCookieValidation to true, cookies sent from the user will be validated to see if they are tampered. The property getCookies cookies returns the collection of cookies. For more details, see CCookieCollection.

CHttpRequest is a default application component loaded by CWebApplication. It can be accessed via CWebApplication::getRequest().

CComponent
Extended by CApplicationComponent implements IApplicationComponent
Extended by CHttpRequest
Extended by X2HttpRequest
Package: system\web
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/protected/components/X2HttpRequest.php
Methods summary
public
# validateCsrfToken( CEvent $event )

Override parent method to prevent csrf token validation during whitelisted requests

Override parent method to prevent csrf token validation during whitelisted requests

Parameters

$event
CEvent
$event event parameter

Throws

CHttpException
if the validation fails

Overrides

CHttpRequest::validateCsrfToken()
public
# redirect( string $url, boolean $terminate = true, integer $statusCode = 302 )

Redirects the browser to the specified URL.

Redirects the browser to the specified URL.

Parameters

$url
string
$url URL to be redirected to. Note that when URL is not absolute (not starting with "/") it will be relative to current request URL.
$terminate
boolean
$terminate whether to terminate the current application
$statusCode
integer
$statusCode the HTTP status code. Defaults to 302. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for details about HTTP status code.

Overrides

CHttpRequest::redirect()
Methods inherited from CHttpRequest
compareAcceptTypes(), createCsrfCookie(), decodePathInfo(), getAcceptTypes(), getBaseUrl(), getBrowser(), getCookies(), getCsrfToken(), getDelete(), getHostInfo(), getHttpVersion(), getIsAjaxRequest(), getIsDeleteRequest(), getIsDeleteViaPostRequest(), getIsFlashRequest(), getIsPatchRequest(), getIsPatchViaPostRequest(), getIsPostRequest(), getIsPutRequest(), getIsPutViaPostRequest(), getIsSecureConnection(), getParam(), getPatch(), getPathInfo(), getPort(), getPost(), getPreferredAcceptType(), getPreferredAcceptTypes(), getPreferredLanguage(), getPreferredLanguages(), getPut(), getQuery(), getQueryString(), getRawBody(), getRequestType(), getRequestUri(), getRestParams(), getScriptFile(), getScriptUrl(), getSecurePort(), getServerName(), getServerPort(), getUrl(), getUrlReferrer(), getUserAgent(), getUserHost(), getUserHostAddress(), init(), normalizeRequest(), parseAcceptHeader(), sendFile(), setBaseUrl(), setHostInfo(), setPort(), setScriptUrl(), setSecurePort(), stripSlashes(), xSendFile()
Methods inherited from CApplicationComponent
getIsInitialized()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties inherited from CHttpRequest
$csrfCookie, $csrfTokenName, $enableCookieValidation, $enableCsrfValidation
Properties inherited from CApplicationComponent
$behaviors
Magic properties inherited from CHttpRequest
$acceptTypes, $baseUrl, $browser, $csrfToken, $hostInfo, $isAjaxRequest, $isDeleteRequest, $isFlashRequest, $isPatchRequest, $isPostRequest, $isPutRequest, $isSecureConnection, $pathInfo, $port, $preferredAcceptType, $preferredAcceptTypes, $preferredLanguage, $preferredLanguages, $queryString, $requestType, $requestUri, $scriptFile, $scriptUrl, $securePort, $serverName, $serverPort, $url, $urlReferrer, $userAgent, $userHost, $userHostAddress
Magic properties inherited from CApplicationComponent
$isInitialized
X2CRM Documentation API documentation generated by ApiGen 2.8.0