1 | <?php |
||
12 | class Change |
||
13 | { |
||
14 | /** |
||
15 | * The type of change to apply to the Page. Can be 'custom_code', 'custom_css', |
||
16 | * 'attribute', 'mobile_live_variable', 'mobile_code_block', 'mobile_visual_change', |
||
17 | * 'widget', 'insert_html', 'insert_image' or 'redirect'. |
||
18 | * @var string |
||
19 | */ |
||
20 | private $type; |
||
21 | |||
22 | /** |
||
23 | * Whether or not to allow additional redirects after redirecting to |
||
24 | * destination. Required for changes of type redirect. |
||
25 | * @var boolean |
||
26 | */ |
||
27 | private $allowAdditionalRedirect; |
||
28 | |||
29 | /** |
||
30 | * Indicates whether or not to execute the change asyncronously. |
||
31 | * @var boolean |
||
32 | */ |
||
33 | private $async; |
||
34 | |||
35 | /** |
||
36 | * CSS selector to determine where changes are applied. Required for changes |
||
37 | * of type custom_css, insert_html and insert_image. |
||
38 | * @var string |
||
39 | */ |
||
40 | private $cssSelector; |
||
41 | |||
42 | /** |
||
43 | * A list of dependent change IDs that must happen before this change |
||
44 | * @var array[string] |
||
45 | */ |
||
46 | private $dependencies; |
||
47 | |||
48 | /** |
||
49 | * URL to redirect to. Required for changes of type redirect. |
||
50 | * @var string |
||
51 | */ |
||
52 | private $destination; |
||
53 | |||
54 | /** |
||
55 | * ID of the extension to insert. Required for changes of type extension. |
||
56 | * @var string |
||
57 | */ |
||
58 | private $extensionId; |
||
59 | |||
60 | /** |
||
61 | * Whether or not to preserve parameters from original request when |
||
62 | * redirecting to new destination URL. Required for changes of type redirect. |
||
63 | * @var boolean |
||
64 | */ |
||
65 | private $preserveParameters; |
||
66 | |||
67 | /** |
||
68 | * The Page ID to apply changes to |
||
69 | * @var string |
||
70 | */ |
||
71 | private $src; |
||
72 | |||
73 | /** |
||
74 | * The value for the change |
||
75 | * @var string |
||
76 | */ |
||
77 | private $value; |
||
78 | |||
79 | /** |
||
80 | * The ID of the change |
||
81 | * @var integer |
||
82 | */ |
||
83 | private $id; |
||
84 | |||
85 | /** |
||
86 | * Constructor. |
||
87 | */ |
||
88 | 14 | public function __construct($options = array()) |
|
108 | |||
109 | /** |
||
110 | * Returns this object as array. |
||
111 | */ |
||
112 | 6 | public function toArray() |
|
137 | |||
138 | 7 | public function getType() |
|
142 | |||
143 | 14 | public function setType($type) |
|
147 | |||
148 | 6 | public function getAllowAdditionalRedirect() |
|
152 | |||
153 | 14 | public function setAllowAdditionalRedirect($allowAdditionalRedirect) |
|
157 | |||
158 | 6 | public function getAsync() |
|
162 | |||
163 | 14 | public function setAsync($async) |
|
167 | |||
168 | 6 | public function getCssSelector() |
|
172 | |||
173 | 14 | public function setCssSelector($cssSelector) |
|
177 | |||
178 | 6 | public function getDependencies() |
|
182 | |||
183 | 14 | public function setDependencies($dependencies) |
|
187 | |||
188 | 6 | public function getDestination() |
|
192 | |||
193 | 14 | public function setDestination($destination) |
|
197 | |||
198 | 6 | public function getExtensionId() |
|
202 | |||
203 | 12 | public function setExtensionId($extensionId) |
|
207 | |||
208 | 6 | public function getPreserveParameters() |
|
212 | |||
213 | 14 | public function setPreserveParameters($preserveParameters) |
|
217 | |||
218 | 7 | public function getSrc() |
|
222 | |||
223 | 14 | public function setSrc($src) |
|
227 | |||
228 | 7 | public function getValue() |
|
232 | |||
233 | 14 | public function setValue($value) |
|
237 | |||
238 | 6 | public function getId() |
|
242 | |||
243 | 10 | public function setId($id) |
|
247 | } |
||
248 | |||
253 |
According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.