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

Class: Message

Source Location: /common/Message.php

Class Overview

CwSerializable
   |
   --Message

A class for messages


Variables

Constants

Methods


Inherited Variables

Inherited Methods

Class: CwSerializable

CwSerializable::__construct()
Constructor
CwSerializable::copyAllVars()
Copy all properties from one object to another (overwriting previous ones)
CwSerializable::getValue()
Returns structure's property value if property exists
CwSerializable::guessClassName()
Tries to guess the class to use from the property being unserialised.
CwSerializable::unserialize()
Unserializes from a stdClass structure
CwSerializable::unserializeArray()
Returns an array of typed values
CwSerializable::unserializeObject()
Returns an unserialized object from a stdClass structure
CwSerializable::unserializeObjectMap()
Returns an array of unserialized objects from a stdClass structure
CwSerializable::unserializeStringArray()
Returns an array of typed values from a string
CwSerializable::unserializeValue()
Returns a typed value from a structure property

Class Details

[line 30]
A class for messages

Theses messages are intended to be displayed to the client.




[ Top ]


Class Variables

$channel =

[line 65]

The channel identifier of this message. See the constants named CHANNEL_... .



Tags:

access:  public

Type:   int


[ Top ]

$message =

[line 58]

The text of the message to show to the user.



Tags:

access:  public

Type:   string


[ Top ]

$messageId =

[line 52]

Optional message identifier for machine parsing of messages. For

instance, a message labeled "Too many results found", can have a message identifier name "tooManyResults"




Tags:

access:  public

Type:   string


[ Top ]

$plugin =

[line 44]

The name of the plugin generation this message, or null if not created

from a plugin




Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor __construct [line 74]

Message __construct( [string $message = NULL], [int $channel = self::CHANNEL_USER], [string $plugin = NULL], [string $messageId = NULL])

Constructor



Tags:

access:  public


Overrides CwSerializable::__construct() (Constructor)

Parameters:

string   $message   the text of the message
int   $channel   the channel identifier of the message
string   $plugin   optinal plugin name attached to this message
string   $messageId   optional message identifier, for machine message parsing

[ Top ]

method unserialize [line 86]

void unserialize( mixed $struct)

Sets object properties from $struct data.



Tags:

access:  public


Overrides CwSerializable::unserialize() (Unserializes from a stdClass structure)

[ Top ]


Class Constants

CHANNEL_DEVELOPER =  2

[line 37]


[ Top ]

CHANNEL_USER =  1

[line 36]

Constants to define the different the purpose of the message. Used for instance to distinguate user and developer targeted messages.


[ Top ]



Documentation generated on Fri, 21 Sep 2007 13:30:55 +0200 by phpDocumentor 1.3.0RC3