-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcomment.php
More file actions
executable file
·43 lines (39 loc) · 866 Bytes
/
comment.php
File metadata and controls
executable file
·43 lines (39 loc) · 866 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
36
37
38
39
40
41
42
43
<?php
class Comment
{
public $id;
public $name;
public $email;
public $website;
public $comment;
public $datePosted;
public $postId;
function __construct($inId=null, $inName=null, $inEmail=null, $inWebsite=null, $inComment=null, $inDatePosted=null, $inPostId=null)
{
if (!empty($inId)) {
$this->id = $inId;
}
if (!empty($inName)) {
$this->name = $inName;
}
if (!empty($inEmail)) {
$this->email = $inEmail;
}
if (!empty($inWebsite)) {
$this->website = $inWebsite;
}
if (!empty($inComment)) {
$this->comment = $inComment;
}
if (!empty($inDatePosted)) {
$splitDate = explode("-", $inDatePosted);
$this->datePosted = $splitDate[1] . "/" . $splitDate[2] . "/" . $splitDate[0];
}
if (!empty($inPostId)) {
$this->postId = $inPostId;
}
}
function update(){
}
}
?>