TYPO3 CMS  TYPO3_6-2
All Classes Namespaces Files Functions Variables Pages
Comment.php
Go to the documentation of this file.
1 <?php
20 
24  protected $date;
25 
30  protected $author = '';
31 
36  protected $email = '';
37 
42  protected $content = '';
43 
47  public function __construct() {
48  $this->date = new \DateTime();
49  }
50 
57  public function setDate(\DateTime $date) {
58  $this->date = $date;
59  }
60 
66  public function getDate() {
67  return $this->date;
68  }
69 
76  public function setAuthor($author) {
77  $this->author = $author;
78  }
79 
85  public function getAuthor() {
86  return $this->author;
87  }
88 
95  public function setEmail($email) {
96  $this->email = $email;
97  }
98 
104  public function getEmail() {
105  return $this->email;
106  }
107 
114  public function setContent($content) {
115  $this->content = $content;
116  }
117 
123  public function getContent() {
124  return $this->content;
125  }
126 
132  public function __toString() {
133  return $this->author . ' (' . $this->email . ') said on ' . $this->date->format('Y-m-d') . ':' . chr(10) .
134  $this->content . chr(10);
135  }
136 }
137 ?>