Example #1
0
 /**
  * create a new Inbox
  *
  * @param int $userId user identification
  * if it not defined it use the current user id
  * @param MessageFilter $messageFilter
  * if it not defined it used the default value (deleted, read or unread)
  */
 public function __construct($userId = NULL, $messageFilter = NULL)
 {
     if (is_null($messageFilter)) {
         $messageFilter = new InBoxStrategy();
     }
     parent::__construct($messageFilter, $userId);
 }
Example #2
0
 /**
  * construct the trash box
  *
  * @param int $userId user identification
  * if it is not defined it use the current user id
  * @param MessageFilter $messageFilter
  * if it not defined it use default value for the stratgy
  */
 public function __construct($userId = NULL, $messageStrategy = NULL)
 {
     if (is_null($messageStrategy)) {
         $messageStrategy = new TrashBoxStrategy();
     }
     parent::__construct($messageStrategy, $userId);
 }