forked from NickCarneiro/PillowChat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocuments.php
More file actions
35 lines (30 loc) · 741 Bytes
/
documents.php
File metadata and controls
35 lines (30 loc) · 741 Bytes
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
<?php
class chatDocument extends phpillowDocument
{
protected static $type = 'chat_message';
protected $versioned = false;
protected $requiredProperties = array(
'message',
'timestamp',
'username'
);
public function __construct()
{
$this->properties = array(
'message' => new phpillowStringValidator(),
'username' => new phpillowStringValidator(),
'timestamp' => new phpillowStringValidator(),
'tripcode' => new phpillowStringValidator()
);
parent::__construct();
}
protected function generateId()
{
return null;
}
protected function getType()
{
return self::$type;
}
}
?>