wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
ControllerMessage Class Reference
+ Inheritance diagram for ControllerMessage:

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=null)
 
 getBooleanValue ($name, $default=false)
 
getData ()
 
 setData (&$data)
 
 clearValue ($name)
 
 clearValues ()
 
 toString ()
 

Public Attributes

 $_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@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

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

Member Function Documentation

ControllerMessage::ControllerMessage (   $sender,
  $context,
  $action,
  $data 
)

Constructor

Parameters
senderThe name of the controller that sent the message
contextThe name of the context of the message
actionThe name of the action that the message initiates
dataAn associative array containing the message variables together with their values.

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

References WCMFException\throwEx().

+ Here is the call graph for this function:

ControllerMessage::setSender (   $sender)

Set the name of the sending Controller

Parameters
senderThe name of the Controller

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

ControllerMessage::getSender ( )

Get the name of the sending Controller

Returns
The name of the Controller

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

References $_sender.

ControllerMessage::setContext (   $context)

Set the name of the context

Parameters
contextThe name of the context

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

ControllerMessage::getContext ( )

Get the name of the context

Returns
The name of the context

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

References $_context.

ControllerMessage::setAction (   $action)

Set the name of the action

Parameters
actionThe name of the action

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

ControllerMessage::getAction ( )

Get the name of the action

Returns
The name of the action

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

References $_action.

ControllerMessage::setFormat (   $format)

Set the message format

Parameters
formatOne of the MSG_FORMAT constants

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

ControllerMessage::getFormat ( )

Get the message format

Returns
format One of the MSG_FORMAT constants

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

References $_format.

ControllerMessage::setValue (   $name,
  $value 
)

Set a value

Parameters
nameThe name of the variable
valueThe value of the variable

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

ControllerMessage::appendValue (   $name,
  $value 
)

Append a value

Parameters
nameThe name of the variable
valueThe value to append to the variable

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

ControllerMessage::hasValue (   $name)

Check for existance of a value

Parameters
nameThe 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 getBooleanValue(), and getValue().

ControllerMessage::getValue (   $name,
  $default = null 
)

Get a value

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

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

References hasValue().

+ Here is the call graph for this function:

ControllerMessage::getBooleanValue (   $name,
  $default = false 
)

Get a value as boolean

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

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

References hasValue().

+ Here is the call graph for this function:

& ControllerMessage::getData ( )

Get all values as an associative array

Returns
A reference to an data array

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

References $_data.

ControllerMessage::setData ( $data)

Set all values at once

Parameters
dataA reference to the data

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

ControllerMessage::clearValue (   $name)

Remove a value

Parameters
nameThe name of the variable

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

ControllerMessage::clearValues ( )

Remove all values

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

ControllerMessage::toString ( )

Get a string repr�sentation of the message

Returns
The string

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

Member Data Documentation

ControllerMessage::$_sender = null

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

Referenced by getSender().

ControllerMessage::$_context = null

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

Referenced by getContext().

ControllerMessage::$_action = null

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

Referenced by getAction().

ControllerMessage::$_format = null

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

Referenced by getFormat().

ControllerMessage::$_data = array()

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

Referenced by getData().


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