MessageBox Class Reference

Inheritance diagram for MessageBox:
OutBox ReceivedMessageBox InBox TrashBox

Public Member Functions

 __construct ($strategy, $userId=NULL)
 next ()
 valid ()
 loadMessageList ()
 getNumberOfMessage ()
 key ()
 getMessageStrategy ()
 setMessageStrategy ($messageFilter)
 rewind ()
 getUserId ()
 count ()

Protected Attributes

 $messageFilter = NULL
 $messageList = FALSE
 $numberOfMessage = FALSE
 $index
 $userId

Detailed Description

Definition at line 17 of file messagebox.lib.php.


Constructor & Destructor Documentation

__construct ( strategy,
userId = NULL 
)

create an object MessageBox for the user in parameters and with strategy

Parameters:
MessageStrategy $strategy strategy to apply
int $userId user identification of the message box (optionnal, default: current_user_id())

Reimplemented in InBox, OutBox, and TrashBox.

Definition at line 32 of file messagebox.lib.php.


Member Function Documentation

count (  ) 

return the number of message of the iterator

Returns:
int return the number of message of the iterator

Definition at line 142 of file messagebox.lib.php.

getMessageStrategy (  ) 

return the message strategy

Returns:
MessageStrategy

Definition at line 103 of file messagebox.lib.php.

getNumberOfMessage (  )  [abstract]

return the number of message in the messageBox

Returns:
int number of message

Reimplemented in OutBox, and ReceivedMessageBox.

getUserId (  ) 

return the user identification of the current message box

Returns:
int user identification

Definition at line 132 of file messagebox.lib.php.

key (  ) 
Returns:
int the identification of the current message

Definition at line 93 of file messagebox.lib.php.

loadMessageList (  )  [abstract]

Load the list of message

Reimplemented in OutBox, and ReceivedMessageBox.

next (  ) 

add 1 to the index for the iterator

Definition at line 48 of file messagebox.lib.php.

rewind (  ) 

return the iterator to begin

Definition at line 122 of file messagebox.lib.php.

setMessageStrategy ( messageFilter  ) 

set the message filter

Parameters:
MessageFilter $messageFilter filter

Definition at line 113 of file messagebox.lib.php.

valid (  ) 

check if the message in index $index exist

Returns:
boolean

Definition at line 61 of file messagebox.lib.php.


Field Documentation

$index [protected]

Definition at line 22 of file messagebox.lib.php.

$messageFilter = NULL [protected]

Definition at line 19 of file messagebox.lib.php.

$messageList = FALSE [protected]

Definition at line 20 of file messagebox.lib.php.

$numberOfMessage = FALSE [protected]

Definition at line 21 of file messagebox.lib.php.

$userId [protected]

Definition at line 23 of file messagebox.lib.php.


The documentation for this class was generated from the following file:
Generated on Tue Jun 8 12:28:39 2010 for Claroline API by  doxygen 1.6.3