abstract Controller_REST
Kohana_Controller_REST
Controller
Kohana_Controller

Class Contents

Constants

  • None

Properties

Class declared in SYSPATH/classes/controller/rest.php on line 3.

Properties

public $request

Methods

public action_invalid( )
Kohana_Controller_REST

Source Code
public function action_invalid()
{
	// Send the "Method Not Allowed" response
	$this->request->status = 405;
	$this->request->headers['Allow'] = implode(', ', array_keys($this->_action_map));
}

public before( )
Kohana_Controller_REST

Source Code
public function before()
{
	$this->_action_requested = $this->request->action;

	if ( ! isset($this->_action_map[Request::$method]))
	{
		$this->request->action = 'invalid';
	}
	else
	{
		$this->request->action = $this->_action_map[Request::$method];
	}

	return parent::before();
}

public __construct( )
Kohana_Controller

Source Code
public function __construct(Request $request)
{
	// Assign the request to the controller
	$this->request = $request;
}

public after( )
Kohana_Controller

Source Code
public function after()
{
	// Nothing by default
}