\Hazaar\Controller
Basic
Abstract
Basic controller class

This controller is a basic controller for directly handling requests. Developers can extend this class to create their own flexible controllers for use in modern AJAX enabled websites that don’t require HTML views.

How it works is a request is passed to the controller and the controller is responsible for processing it, creating a new response object and return that object back to the application for processing.

This controller type is typically used for handling AJAX requests as responses to these requests do not require rendering any views. This allows AJAX requests to be processed quickly without the overhead of rendering a view that will never be displayed.

Summary
Methods Properties Constants
url
No constants
Properties
$action
$action
$javaMode
$javaMode
Inherited
$request
$request
Inherited
$statusCode
$statusCode
Methods
__initialize()
__initialize($request)

Parameters

$request

No description

__run()
__run()
enableJavaMode()
enableJavaMode()
Inherited
active()
active($controller = null, $action = null)

Parameters

$controller

No description

$action

No description

Inherited
cacheAction()
cacheAction($action, $timeout = 60)

Parameters

$action

No description

$timeout

No description

Inherited
getName()
getName()
Inherited
redirect()
redirect($location, $args = Array ( ) , $save_url = true)

Parameters

$location

No description

$args

No description

$save_url

No description

Inherited
setApplication()
setApplication($application)

Parameters

$application

No description

Inherited
setRequest()
setRequest($request)

Parameters

$request

No description

Inherited
setStatus()
setStatus($code)

Parameters

$code

No description

Inherited
url()
url()
Generate a URL relative to the controller

This is the controller relative method for generating URLs in your application. URLs generated from here are relative to the controller. For URLs that are relative to the current application see Application::url()

Parameters are dynamic and depend on what you are trying to generate.

For examples see: \ref generating_urls