\LiftKit\ControllerRest

Abstract base class for REST Controllers

This class is deprecated and should not be used! Use RestInterface instead.

Summary

Methods
Properties
Constants
__construct()
dispatch()
respondsTo()
index()
get()
insert()
update()
delete()
No public properties found
No constants found
No protected methods found
$container
N/A
No private methods found
No private properties found
N/A

Properties

$container

$container : \LiftKit\DependencyInjection\Container\Container

Dependency injection container

Type

\LiftKit\DependencyInjection\Container\Container

Methods

__construct()

__construct(\LiftKit\DependencyInjection\Container\Container  $container) 

Initializes object

Parameters

\LiftKit\DependencyInjection\Container\Container $container

dispatch()

dispatch(string  $method, array  $args = array()) : \LiftKit\Response\Response

Dispatches a Controller action.

Parameters

string $method

The name of the method to be executed.

array $args

An array of arguments to be passed to the method.

Throws

\LiftKit\Controller\Exception\InvalidResponse
\LiftKit\Controller\Exception\InvalidMethod

Returns

\LiftKit\Response\Response

respondsTo()

respondsTo(string  $method, array  $args = array()) : boolean

Will indicate whether the controller responds to a particular combination of method and arguments.

Parameters

string $method

The name of the method to be executed.

array $args

An array of arguments to be passed to the method.

Returns

boolean —

true if the controller can respond, false if not

get()

get(mixed  $id) : \LiftKit\Response\Response

Get

Returns a single resource.

Parameters

mixed $id

Identifier of resource

Returns

\LiftKit\Response\Response

update()

update(mixed  $id) : \LiftKit\Response\Response

Update

Updates an existing resource

Parameters

mixed $id

Identifier of resource

Returns

\LiftKit\Response\Response

delete()

delete(mixed  $id) : \LiftKit\Response\Response

Delete

Deletes an existing resource.

Parameters

mixed $id

Identifier of resource

Returns

\LiftKit\Response\Response