-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComment.php
More file actions
41 lines (34 loc) · 797 Bytes
/
Comment.php
File metadata and controls
41 lines (34 loc) · 797 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
<?php
/**
* Created by PhpStorm.
* User: ExE
* Date: 27.01.17
* Time: 12:04
*/
class Comment extends APIObject {
public $id;
public $text;
public $created_at;
public $updated_at;
public $card_phase_detail_id;
public $created_by; // User
/**
* @param null $data
*/
function __construct($data = null) {
if ($data != null) {
$this->assign_results($data);
}
}
/**
* @param null $comment_id int
* @return $this
*/
public function fetch($comment_id = null) {
if ($comment_id == null)
$comment_id = $this->id;
$resp = $this->send_get("https://app.pipefy.com/comments/$comment_id.json", null, null);
$this->assign_results($resp);
return $this;
}
}