wcmf logo wemove logo

ControllerMessage Class Reference
[Presentation]

ControllerMessages are sent between Controllers and are used to transfer data between them. ControllerMessages are dispatched by ActionMapper, which decides upon the message's controller, context and action parameter to which Controller it will be send. More...

Inheritance diagram for ControllerMessage:

Inheritance graph
[legend]

Public Member Functions

 ControllerMessage ($sender, $context, $action, $data)
 setSender ($sender)
 getSender ()
 setContext ($context)
 getContext ()
 setAction ($action)
 getAction ()
 setFormat ($format)
 getFormat ()
 setValue ($name, $value)
 appendValue ($name, $value)
 hasValue ($name)
 getValue ($name, $default='')
getData ()
 setData (&$data)
 clearValue ($name)
 clearValues ()
 toString ()

Data Fields

 $_sender = null
 $_context = null
 $_action = null
 $_format = null
 $_data = array()

Detailed Description

ControllerMessages are sent between Controllers and are used to transfer data between them. ControllerMessages are dispatched by ActionMapper, which decides upon the message's controller, context and action parameter to which Controller it will be send.

Author:
ingo herwig <ingo@wemove.com>

Definition at line 37 of file class.ControllerMessage.php.


Member Function Documentation

ControllerMessage ( sender,
context,
action,
data 
)

Constructor

Parameters:
sender The name of the controller that sent the message
context The name of the context of the message
action The name of the action that the message initiates
data An associative array containing the message variables together with their values.

Definition at line 53 of file class.ControllerMessage.php.

setSender ( sender  ) 

Set the name of the sending Controller

Parameters:
sender The name of the Controller

Definition at line 68 of file class.ControllerMessage.php.

getSender (  ) 

Get the name of the sending Controller

Returns:
The name of the Controller

Definition at line 77 of file class.ControllerMessage.php.

setContext ( context  ) 

Set the name of the context

Parameters:
context The name of the context

Definition at line 86 of file class.ControllerMessage.php.

getContext (  ) 

Get the name of the context

Returns:
The name of the context

Definition at line 95 of file class.ControllerMessage.php.

setAction ( action  ) 

Set the name of the action

Parameters:
action The name of the action

Definition at line 104 of file class.ControllerMessage.php.

getAction (  ) 

Get the name of the action

Returns:
The name of the action

Definition at line 113 of file class.ControllerMessage.php.

setFormat ( format  ) 

Set the message format

Parameters:
format One of the MSG_FORMAT constants

Definition at line 122 of file class.ControllerMessage.php.

getFormat (  ) 

Get the message format

Returns:
format One of the MSG_FORMAT constants

Definition at line 131 of file class.ControllerMessage.php.

setValue ( name,
value 
)

Set a value

Parameters:
name The name of the variable
value The value of the variable

Definition at line 141 of file class.ControllerMessage.php.

appendValue ( name,
value 
)

Append a value

Parameters:
name The name of the variable
value The value to append to the variable

Definition at line 151 of file class.ControllerMessage.php.

hasValue ( name  ) 

Check for existance of a value

Parameters:
name The name of the variable
Returns:
True/False wether the value exists or not exist

Definition at line 161 of file class.ControllerMessage.php.

Referenced by getValue().

getValue ( name,
default = '' 
)

Get a value

Parameters:
name The name of the variable
default The default value if the value is not defined [default: '']
Returns:
The value or null if it does not exist

Definition at line 172 of file class.ControllerMessage.php.

References hasValue().

Here is the call graph for this function:

& getData (  ) 

Get all values as an associative array

Returns:
A reference to an data array

Definition at line 184 of file class.ControllerMessage.php.

setData ( &$  data  ) 

Set all values at once

Parameters:
data A reference to the data

Definition at line 193 of file class.ControllerMessage.php.

clearValue ( name  ) 

Remove a value

Parameters:
name The name of the variable

Definition at line 202 of file class.ControllerMessage.php.

clearValues (  ) 

Remove all values

Definition at line 210 of file class.ControllerMessage.php.

toString (  ) 

Get a string repräsentation of the message

Returns:
The string

Definition at line 219 of file class.ControllerMessage.php.


Field Documentation

$_sender = null

Definition at line 39 of file class.ControllerMessage.php.

$_context = null

Definition at line 40 of file class.ControllerMessage.php.

$_action = null

Definition at line 41 of file class.ControllerMessage.php.

$_format = null

Definition at line 42 of file class.ControllerMessage.php.

$_data = array()

Definition at line 43 of file class.ControllerMessage.php.


The documentation for this class was generated from the following file:

This page generated via doxygen 1.5.8 Mon Mar 30 01:58:43 2009.
Copyright © 2009 wemove digital solutions GmbH.
sourceforge logo