Class WsController
WsController Is controller part of Model-View-Controller. WsController manages a set of actions which deal with the corresponding user requests. Through the actions, WsController coordinates the data flow between models and views.
Example usage:
class SiteController extends WsController { // this function handles request to 'http://server_name/site/index' public function index() { // use variable $m in view file $m = 'this is test'; // view file 'index.php' is placed in directory // '/application/views/site' $this->render('index', array('m' => $m)); } }
Located at WsController.class.php
public
|
|
public
|
|
public
string
|
|
public
string
|
|
public
|
#
sendResponse( mixed $data, integer $status = 200 )
Send HTTP response with status and JSON data. It's used for implementation of RESTful API. |
public
|
|
public
boolean
|
public
string
|
$layout
$layout Name of layout file located in '/public/layouts' |
|
public
string
|
$title
$title Web page title |
|
public
array
|
$breadcrumbs
$breadcrumbs List of links that indicate position in Web app |