1 | <?php |
||
7 | class TrelloMessage |
||
8 | { |
||
9 | /** @var string */ |
||
10 | protected $name; |
||
11 | |||
12 | /** @var string */ |
||
13 | protected $description; |
||
14 | |||
15 | /** @var string|int */ |
||
16 | protected $position; |
||
17 | |||
18 | /** @var string|null */ |
||
19 | protected $due; |
||
20 | |||
21 | /** |
||
22 | * @param string $name |
||
23 | * |
||
24 | * @return static |
||
25 | */ |
||
26 | 1 | public static function create($name = '') |
|
30 | |||
31 | /** |
||
32 | * @param string $name |
||
33 | */ |
||
34 | 11 | public function __construct($name = '') |
|
38 | |||
39 | /** |
||
40 | * Set the card name. |
||
41 | * |
||
42 | * @param $name |
||
43 | * |
||
44 | * @return $this |
||
45 | */ |
||
46 | 1 | public function name($name) |
|
52 | |||
53 | /** |
||
54 | * Set the card description. |
||
55 | * |
||
56 | * @param $description |
||
57 | * |
||
58 | * @return $this |
||
59 | */ |
||
60 | 3 | public function description($description) |
|
66 | |||
67 | /** |
||
68 | * Set the card position. |
||
69 | * |
||
70 | * @param string|int $position |
||
71 | * |
||
72 | * @return $this |
||
73 | */ |
||
74 | 1 | public function position($position) |
|
80 | |||
81 | /** |
||
82 | * Set the card position to 'top'. |
||
83 | * |
||
84 | * @return $this |
||
85 | */ |
||
86 | 3 | public function top() |
|
92 | |||
93 | /** |
||
94 | * Set the card position to 'bottom'. |
||
95 | * |
||
96 | * @return $this |
||
97 | */ |
||
98 | 1 | public function bottom() |
|
104 | |||
105 | /** |
||
106 | * Set the card position due date. |
||
107 | * |
||
108 | * @param string|DateTime $due |
||
109 | * |
||
110 | * @return $this |
||
111 | */ |
||
112 | 2 | public function due($due) |
|
122 | |||
123 | /** |
||
124 | * @return array |
||
125 | */ |
||
126 | 11 | public function toArray() |
|
135 | } |
||
136 |