Overview

Packages

  • Components
  • Internals
    • AR
  • RestApi
    • Objects
    • Services

Classes

  • CBHttpRequest
  • CBJson
  • CBJsonController
  • CBJsonInlineAction
  • CBJsonModel
  • Overview
  • Package
  • Class
  • Tree
  • Todo

Class CBHttpRequest

Json-capable CHttpRequest.

The following capabilities are added to Yii::app()->request:
  1. Access to request headers: getRequestHeaders() and getRequestHeader()
  2. Access to request raw payload: getRequestRawBody()
CHttpRequest
Extended by CBHttpRequest
Package: Components
Author: Konstantinos Filios <konfilios@gmail.com>
Since: 1.0
Located at components/CBHttpRequest.php
Methods summary
public
# init( )

Initialize content type of request.

Initialize content type of request.

public string[]
# getAcceptContentTypes( )

Returns array of accepted content types.

Returns array of accepted content types.

Returns

string[]
public boolean
# getIsJsonRequest( )

Returns whether this is a JSON request.

Returns whether this is a JSON request.

Returns

boolean
public string
# getRequestRawBody( )

Get raw body of HTTP request.

Get raw body of HTTP request.

Returns

string
public string
# getRequestHeaders( )

Get all request headers.

Get all request headers.

Returns

string
Header value or null if header is not set
public string
# getRequestHeader( string $fieldName )

Get request header value.

Get request header value.

Parameters

$fieldName
string
$fieldName

Returns

string
Header value or null if header is not set
Bogo Yii Json Service API documentation generated by ApiGen 2.8.0