IBOS open source
  • Namespace
  • Class

Namespaces

  • application
    • core
      • cache
        • driver
        • provider
      • components
      • controllers
      • engines
        • local
        • sae
      • model
      • modules
      • utils
      • widgets
    • modules
      • article
        • controllers
        • core
        • model
        • utils
      • calendar
        • controllers
        • model
        • utils
      • contact
        • controllers
        • model
        • utils
      • dashboard
        • controllers
        • model
        • utils
      • department
        • components
        • model
        • utils
      • diary
        • components
        • controllers
        • model
        • utils
        • widgets
      • email
        • controllers
        • core
        • model
        • utils
      • main
        • behaviors
        • components
        • controllers
        • model
        • utils
        • widgets
      • message
        • controllers
        • core
          • co
          • wx
            • callback
            • event
        • model
        • utils
      • mobile
        • components
        • controllers
        • utils
      • position
        • components
        • model
        • utils
      • recruit
        • components
        • controllers
        • core
        • model
        • utils
        • widgets
      • role
        • model
        • utils
      • user
        • components
        • controllers
        • model
        • utils
      • vote
        • components
        • controllers
        • model
        • utils
      • weibo
        • controllers
        • core
        • model
        • utils

Classes

  • Controller
  • RestController

Class RestController

CController
Extended by application\core\controllers\Controller
Extended by application\core\controllers\RestController
Namespace: application\core\controllers
Copyright: Copyright © 2008-2013 IBOS Inc
Author: banyanCheung banyan@ibos.com.cn
Located at system/core/controllers/RestController.php

Methods summary

public
# __construct( $id, $module = null )

Overrides

application\core\controllers\Controller::__construct
protected string
# getAcceptType( )

获取当前请求的Accept头信息

获取当前请求的Accept头信息

Returns

string
public
# run( type $actionID )

Parameters

$actionID
protected
# sendHttpStatus( $code )
public
# setContentType( string $type, string $charset = '' )

设置页面输出的CONTENT_TYPE和编码

设置页面输出的CONTENT_TYPE和编码

Parameters

$type
content_type 类型对应的扩展名
$charset
页面输出编码
protected string
# encodeData( mixed $data, String $type = '' )

编码数据

编码数据

Parameters

$data
要返回的数据
$type
返回类型 JSON XML

Returns

string
protected
# response( mixed $data, String $type = '', integer $code = 200 )

输出返回数据

输出返回数据

Parameters

$data
要返回的数据
$type
返回类型 JSON XML
$code
HTTP状态
public boolean
# filterRoutes( string $routes )

ICAPPLICATION组件会调用各控制器的此方法进行验证,子类可重写这个实现各自的验证 规则

ICAPPLICATION组件会调用各控制器的此方法进行验证,子类可重写这个实现各自的验证 规则

Parameters

$routes

Returns

boolean

Overrides

application\core\controllers\Controller::filterRoutes

Methods inherited from application\core\controllers\Controller

actionError(), ajaxReturn(), error(), filterNotAuthModule(), getAssetUrl(), init(), render(), setTitle(), showMessage(), success()

Constants summary

Constants inherited from application\core\controllers\Controller

DEFAULT_JSONP_HANDLER

Properties summary

protected string $_method
# ''
protected string $_type
# ''
protected array $allowMethod
# array( 'get', 'post', 'put', 'delete' )
protected string $defaultMethod
# 'get'
protected array $allowType
# array( 'html', 'xml', 'json', 'rss' )
protected string $defaultType
# 'html'
protected array $allowOutputType
# array( 'xml' => 'application/xml', 'json' => 'application/json', 'html' => 'text/html', )

Properties inherited from application\core\controllers\Controller

$layout

IBOS open source API documentation generated by ApiGen