1 | <?php |
||
21 | abstract class PulseColumnValue extends ApiObject |
||
22 | { |
||
23 | const API_PREFIX = "boards"; |
||
24 | |||
25 | /** |
||
26 | * The ID of the parent board that this column's Pulse belongs to. |
||
27 | * |
||
28 | * @var int |
||
29 | */ |
||
30 | protected $board_id; |
||
31 | |||
32 | /** |
||
33 | * The ID of the current column. This is a unique identifier when accessing columns through the API. |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $column_id; |
||
38 | |||
39 | /** |
||
40 | * The ID of the Pulse this column value belongs to |
||
41 | * |
||
42 | * @var int |
||
43 | */ |
||
44 | protected $pulse_id; |
||
45 | |||
46 | /** |
||
47 | * The value that this column has. The data type can be an integer, string, or DateTime depending on the column type |
||
48 | * |
||
49 | * @var mixed |
||
50 | */ |
||
51 | protected $column_value; |
||
52 | |||
53 | /** |
||
54 | * This constructor only accepts an array of the data regarding a specific column |
||
55 | * |
||
56 | * @internal |
||
57 | * |
||
58 | * @param array $array An associative array containing information regarding a column's value |
||
59 | * |
||
60 | * @since 0.1.0 |
||
61 | * |
||
62 | * @throw \InvalidArgumentException An ID is given when an instance of this object can only be created from an array |
||
63 | * of existing data |
||
64 | */ |
||
65 | public function __construct($array) |
||
71 | |||
72 | /** |
||
73 | * Create the appropriate object based on the type of column |
||
74 | * |
||
75 | * @internal |
||
76 | * |
||
77 | * @param string $type The type of column as specified by DaPulse's API; i.e. 'text', 'date', 'color', 'person' |
||
78 | * @param array $data An associative array containing data regarding the column |
||
79 | * |
||
80 | * @since 0.1.0 |
||
81 | * |
||
82 | * @throws \allejo\DaPulse\Exceptions\InvalidObjectException |
||
83 | * |
||
84 | * @return PulseColumnColorValue|PulseColumnDateValue|PulseColumnPersonValue|PulseColumnTextValue |
||
85 | */ |
||
86 | public static function _createColumnType ($type, $data) |
||
105 | |||
106 | abstract public function getValue(); |
||
108 | } |
This check marks property names that have not been written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes
databaseConnectionString
.