Documentation

Horde_Controller_Base
in package
implements Horde_Controller

Base class for controllers that implements the Logged, Injected, and Viewed interfaces.

This class is for convenience, if you decide you wish to use only logging or the injector or views, or neither, you do not have to use it. As long as your controllers implement Horde_Controller, they are runnable.

Tags
author

James Pepin james@bluestatedigital.com

category

Horde

copyright

2008-2017 Horde LLC

license

http://www.horde.org/licenses/bsd BSD

Interfaces, Classes, Traits and Enums

Horde_Controller
Interface for all controller objects

Table of Contents

$_injector  : Horde_Injector
This is marked private on purpose, so that you have to use the getInjector() method to access it in derived classes. This is done so that you don't assume its always set, since its set via setter-injection to save on having to define a constructor param for it
$_logger  : Horde_Log_Logger
Private on purpose so you have to use getLogger().
$_urlWriter  : Horde_Controller_UrlWriter
Private on purpose so you have to use getUrlWriter().
$_view  : Horde_View
Private on purpose so you have to use getView().
getInjector()  : Horde_Injector
Get the injector for this controller
getLogger()  : Horde_Log_Logger
Get the logger assigned to this controller
getRequest()  : mixed
Get the current request
getResponse()  : mixed
Get the current response
getUrlWriter()  : Horde_Controller_UrlWriter
Get an instance of UrlWriter for this controller.
getView()  : Horde_View_Base
Gets the current view for this controller
setInjector()  : mixed
Set the injector for this controller
setLogger()  : mixed
Set the Logger for this controller
setView()  : mixed
Set the Horde_View object to be used for this controller

Properties

$_injector

This is marked private on purpose, so that you have to use the getInjector() method to access it in derived classes. This is done so that you don't assume its always set, since its set via setter-injection to save on having to define a constructor param for it

private Horde_Injector $_injector

$_logger

Private on purpose so you have to use getLogger().

private Horde_Log_Logger $_logger

$_view

Private on purpose so you have to use getView().

private Horde_View $_view

Methods

getInjector()

Get the injector for this controller

public getInjector() : Horde_Injector
Return values
Horde_Injector

The injector previously set for this controller, or a new Horde_Injector_TopLevel

getLogger()

Get the logger assigned to this controller

public getLogger() : Horde_Log_Logger
Return values
Horde_Log_Logger

The logger for this controller

getRequest()

Get the current request

public getRequest() : mixed
Return values
mixed

getResponse()

Get the current response

public getResponse() : mixed
Return values
mixed

getView()

Gets the current view for this controller

public getView() : Horde_View_Base
Tags
note

This method will create an empty Horde_View if none has been set.

Return values
Horde_View_Base

The view for this controller, or a new empty Horde_View if none is set

setInjector()

Set the injector for this controller

public setInjector(Horde_Injector $injector) : mixed
Parameters
$injector : Horde_Injector
Tags
inject
Return values
mixed

setLogger()

Set the Logger for this controller

public setLogger(Horde_Log_Logger $logger) : mixed
Parameters
$logger : Horde_Log_Logger
Tags
inject
Return values
mixed

setView()

Set the Horde_View object to be used for this controller

public setView(Horde_View_Base $view) : mixed
Parameters
$view : Horde_View_Base
Tags
inject
Return values
mixed

Search results