0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Tweet.php
Go to the documentation of this file.
1 <?
24 class Tweet
25 {
26  public function getId() {
27  return ($this->_id);
28  }
29 
30  public function setId($id) {
31  $this->_id=$id;
32  }
33 
34  public function getAuthor() {
35  $a=preg_split('/\.\d+$/', $this->_id);
36  return ($a[0]);
37  }
38 
39  public function getTimestamp() {
40  return ($this->_timestamp);
41  }
42 
43  public function setTimestamp($timestamp) {
44  $this->_timestamp=$timestamp;
45  }
46 
47  public function createId($author) {
48  $a=gettimeofday();
49  $this->_id=sprintf('%s.%u%u', $author, $a['sec'], $a['usec']/1000);
50  }
51 
52  public function getMessage() {
53  return ($this->_message);
54  }
55 
56  public function setMessage($message) {
57  $this->_message=$message;
58  }
59 
60  protected $_id;
61  protected $_timestamp;
62  protected $_message;
63 }
64 
65 ?>
66 
67 
getId()
Definition: Tweet.php:26
createId($author)
Definition: Tweet.php:47
setTimestamp($timestamp)
Definition: Tweet.php:43
$_timestamp
Definition: Tweet.php:61
getAuthor()
Definition: Tweet.php:34
setMessage($message)
Definition: Tweet.php:56
getMessage()
Definition: Tweet.php:52
setId($id)
Definition: Tweet.php:30
Copyright (C) 2007-2015 Hypertable, Inc.
Definition: Tweet.php:24
$_id
Definition: Tweet.php:60
$_message
Definition: Tweet.php:62
getTimestamp()
Definition: Tweet.php:39