-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathField.php
More file actions
47 lines (38 loc) · 866 Bytes
/
Copy pathField.php
File metadata and controls
47 lines (38 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
44
45
46
47
<?php
/**
* Created by PhpStorm.
* User: ExE
* Date: 27.01.17
* Time: 12:03
*/
require_once "APIObject.php";
class Field extends APIObject {
public $id;
public $phase_id;
public $label;
public $default_value;
public $type_id;
public $index;
public $options; // [],
public $created_at;
public $updated_at;
/**
* @param null $data
*/
function __construct($data = null) {
if ($data != null) {
$this->assign_results($data);
}
}
/**
* @param null $field_id int
* @return $this
*/
public function fetch($field_id = null) {
if ($field_id == null)
$field_id = $this->id;
$resp = $this->send_get("https://app.pipefy.com/fields/$field_id.json", null, null);
$this->assign_results($resp);
return $this;
}
}