wCMF
3.6
|
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() | |
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.
Definition at line 37 of file class.ControllerMessage.php.
ControllerMessage::ControllerMessage | ( | $sender, | |
$context, | |||
$action, | |||
$data | |||
) |
Constructor
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.
References WCMFException\throwEx().
ControllerMessage::setSender | ( | $sender | ) |
Set the name of the sending Controller
sender | The name of the Controller |
Definition at line 68 of file class.ControllerMessage.php.
ControllerMessage::getSender | ( | ) |
Get the name of the sending Controller
Definition at line 77 of file class.ControllerMessage.php.
References $_sender.
ControllerMessage::setContext | ( | $context | ) |
Set the name of the context
context | The name of the context |
Definition at line 86 of file class.ControllerMessage.php.
ControllerMessage::getContext | ( | ) |
Get 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
action | The name of the action |
Definition at line 104 of file class.ControllerMessage.php.
ControllerMessage::getAction | ( | ) |
Get the name of the action
Definition at line 113 of file class.ControllerMessage.php.
References $_action.
ControllerMessage::setFormat | ( | $format | ) |
Set the message format
format | One of the MSG_FORMAT constants |
Definition at line 122 of file class.ControllerMessage.php.
ControllerMessage::getFormat | ( | ) |
Get the message format
Definition at line 131 of file class.ControllerMessage.php.
References $_format.
ControllerMessage::setValue | ( | $name, | |
$value | |||
) |
Set a value
name | The name of the variable |
value | The value of the variable |
Definition at line 141 of file class.ControllerMessage.php.
ControllerMessage::appendValue | ( | $name, | |
$value | |||
) |
Append a value
name | The name of the variable |
value | The value to append to the variable |
Definition at line 151 of file class.ControllerMessage.php.
ControllerMessage::hasValue | ( | $name | ) |
Check for existance of a value
name | The name of the variable |
Definition at line 161 of file class.ControllerMessage.php.
Referenced by getBooleanValue(), and getValue().
ControllerMessage::getValue | ( | $name, | |
$default = null |
|||
) |
Get a value
name | The name of the variable |
default | The default value if the value is not defined [default: null] |
Definition at line 172 of file class.ControllerMessage.php.
References hasValue().
ControllerMessage::getBooleanValue | ( | $name, | |
$default = false |
|||
) |
Get a value as boolean
name | The name of the variable |
default | The default value if the value is not defined [default: false] |
Definition at line 188 of file class.ControllerMessage.php.
References hasValue().
& ControllerMessage::getData | ( | ) |
Get all values as an associative array
Definition at line 203 of file class.ControllerMessage.php.
References $_data.
ControllerMessage::setData | ( | & | $data | ) |
Set all values at once
data | A reference to the data |
Definition at line 212 of file class.ControllerMessage.php.
ControllerMessage::clearValue | ( | $name | ) |
Remove a value
name | The 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
Definition at line 238 of file class.ControllerMessage.php.
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().