forked from alekseykuleshov/rocket-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCollection.php
46 lines (40 loc) · 862 Bytes
/
Collection.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace ATDev\RocketChat\Messages;
/**
* Messages Collection
* @package ATDev\RocketChat\Messages
*/
class Collection extends \ATDev\RocketChat\Common\Collection
{
/** @var int */
private $unreadNotLoaded;
/**
* @param Message $element
* @return bool|true
*/
public function add($element)
{
if (!($element instanceof Message)) {
return false;
}
return parent::add($element);
}
/**
* @return int
*/
public function getUnreadNotLoaded()
{
return $this->unreadNotLoaded;
}
/**
* @param $unreadNotLoaded
* @return $this
*/
public function setUnreadNotLoaded($unreadNotLoaded)
{
if (is_int($unreadNotLoaded)) {
$this->unreadNotLoaded = $unreadNotLoaded;
}
return $this;
}
}