Koowa_Controller
[ class tree: Koowa_Controller ] [ index: Koowa_Controller ] [ all elements ]

Class: KControllerService

Source Location: /libraries/koowa/controller/service.php

Class Overview

KObject
   |
   --KControllerAbstract
      |
      --KControllerResource
         |
         --KControllerService

Abstract Bread Controller Class


Author(s):

Methods


Child classes:

Default Controller
KControllerDefault
Default Controller Class

Inherited Variables

Inherited Methods

Class: KControllerResource

KControllerResource::__construct()
Constructor
KControllerResource::getModel()
Get the model object attached to the contoller
KControllerResource::getRedirect()
Returns an array with the redirect url, the message and the message type
KControllerResource::getView()
Get the view object attached to the controller
KControllerResource::setModel()
Method to set a model object attached to the controller
KControllerResource::setRedirect()
Set a URL for browser redirection.
KControllerResource::setView()
Method to set a view object attached to the controller
KControllerResource::_actionGet()
Specialised display function.
KControllerResource::_initialize()
Initializes the default configuration for the object
KControllerResource::__call()
Supports a simple form Fluent Interfaces. Allows you to set the request properties by using the request property name as the method name.
KControllerResource::__set()
Set a request properties

Class: KControllerAbstract

KControllerAbstract::__construct()
Constructor.
KControllerAbstract::execute()
Execute an action by triggering a method in the derived class.
KControllerAbstract::getActions()
Gets the available actions in the controller.
KControllerAbstract::getRequest()
Get the request information
KControllerAbstract::isDispatched()
Has the controller been dispatched
KControllerAbstract::mixin()
Mixin an object
KControllerAbstract::registerActionAlias()
Register (map) an action to a method in the class.
KControllerAbstract::setRequest()
Set the request information
KControllerAbstract::_initialize()
Initializes the default configuration for the object
KControllerAbstract::__call()
Execute a controller action by it's name.
KControllerAbstract::__get()
Get a request property
KControllerAbstract::__set()
Set a request properties

Class: KObject

KObject::__construct()
Constructor
KObject::get()
Get the object properties
KObject::getHandle()
Get a handle for this object
KObject::getIdentifier()
Gets the service identifier.
KObject::getMethods()
Get a list of all the available methods
KObject::getService()
Get an instance of a class based on a class identifier only creating it if it does not exist yet.
KObject::inherits()
Checks if the object or one of it's mixin's inherits from a class.
KObject::mixin()
Mixin an object
KObject::set()
Set the object properties
KObject::_initialize()
Initializes the options for the object
KObject::__call()
Search the mixin method map and call the method or trigger an error
KObject::__clone()
Preform a deep clone of the object.

Class Details

[line 16]
Abstract Bread Controller Class



Tags:

author:  Johan Janssens <johan@nooku.org>
abstract:  


[ Top ]


Class Methods


method setView [line 44]

KControllerAbstract setView( mixed $view)

Method to set a view object attached to the controller



Tags:

throws:  KControllerException If the identifier is not a view identifier
access:  public


Overrides KControllerResource::setView() (Method to set a view object attached to the controller)

Parameters:

mixed   $view   An object that implements KObjectServiceable, KServiceIdentifier object or valid identifier string

[ Top ]

method _actionAdd [line 123]

KDatabaseRow _actionAdd( $context)

Generic add action, saves a new item



Tags:

return:  A row object containing the new data
access:  protected


Parameters:

KCommandContext   $context   A command context object

[ Top ]

method _actionBrowse [line 67]

KDatabaseRowset _actionBrowse( $context)

Generic browse action, fetches a list



Tags:

return:  A rowset object containing the selected rows
access:  protected


Overridden in child classes as:

ComDefaultControllerDefault::_actionBrowse()
Browse action

Parameters:

KCommandContext   $context   A command context object

[ Top ]

method _actionDelete [line 153]

KDatabaseRowset _actionDelete( $context)

Generic delete function



Tags:

return:  A rowset object containing the deleted rows
access:  protected


Parameters:

KCommandContext   $context   A command context object

[ Top ]

method _actionEdit [line 97]

KDatabaseRowset _actionEdit( $context)

Generic edit action, saves over an existing item



Tags:

return:  A rowset object containing the updated rows
access:  protected


Parameters:

KCommandContext   $context   A command context object

[ Top ]

method _actionGet [line 188]

string|false _actionGet( $context)

Get action

This function translates a GET request into a read or browse action. If the view name is singular a read action will be executed, if plural a browse action will be executed.

If the result of the read or browse action is not a row or rowset object the fucntion will passthrough the result, request the attached view to render itself.




Tags:

return:  The rendered output of the view or FALSE if something went wrong
access:  protected


Overridden in child classes as:

ComDefaultControllerDefault::_actionGet()
Display action

Overrides KControllerResource::_actionGet() (Specialised display function.)

Parameters:

KCommandContext   $context   A command context object

[ Top ]

method _actionPost [line 214]

KDatabaseRow(set) _actionPost( $context)

Post action

This function translated a POST request action into an edit or add action. If the model state is unique a edit action will be executed, if not unique an add action will be executed.




Tags:

return:  A row(set) object containing the modified data
access:  protected


Parameters:

KCommandContext   $context   A command context object

[ Top ]

method _actionPut [line 234]

KDatabaseRow(set) _actionPut( $context)

Put action

This function translates a PUT request into an edit or add action. Only if the model state is unique and the item exists an edit action will be executed, if the resources doesn't exist and the state is unique an add action will be executed.

If the resource already exists it will be completely replaced based on the data available in the request.




Tags:

return:  A row(set) object containing the modified data
throws:  KControllerException If the model state is not unique
access:  protected


Parameters:

KCommandContext   $context   A command context object

[ Top ]

method _actionRead [line 79]

KDatabaseRow _actionRead( $context)

Generic read action, fetches an item



Tags:

return:  A row object containing the selected row
access:  protected


Parameters:

KCommandContext   $context   A command context object

[ Top ]

method _initialize [line 26]

void _initialize( $config)

Initializes the default configuration for the object

Called from __construct() as a first step of object instantiation.




Tags:

access:  protected


Overridden in child classes as:

ComDefaultControllerDefault::_initialize()
Initializes the default configuration for the object

Overrides KControllerResource::_initialize() (Initializes the default configuration for the object)

Parameters:

object An   $config   optional KConfig object with configuration options.

[ Top ]


Documentation generated on Wed, 22 May 2013 03:02:31 +0200 by phpDocumentor 1.4.3