PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / sabre / vobject / lib / Property / Boolean.php
ameliabooking / vendor / sabre / vobject / lib / Property Last commit date
ICalendar 1 year ago VCard 1 year ago Binary.php 1 year ago Boolean.php 1 year ago FlatText.php 1 year ago FloatValue.php 1 year ago IntegerValue.php 1 year ago Text.php 1 year ago Time.php 1 year ago Unknown.php 1 year ago Uri.php 1 year ago UtcOffset.php 1 year ago
Boolean.php
73 lines
1 <?php
2
3 namespace Sabre\VObject\Property;
4
5 use Sabre\VObject\Property;
6
7 /**
8 * Boolean property.
9 *
10 * This object represents BOOLEAN values. These are always the case-insensitive
11 * string TRUE or FALSE.
12 *
13 * Automatic conversion to PHP's true and false are done.
14 *
15 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
16 * @author Evert Pot (http://evertpot.com/)
17 * @license http://sabre.io/license/ Modified BSD License
18 */
19 class Boolean extends Property
20 {
21 /**
22 * Sets a raw value coming from a mimedir (iCalendar/vCard) file.
23 *
24 * This has been 'unfolded', so only 1 line will be passed. Unescaping is
25 * not yet done, but parameters are not included.
26 *
27 * @param string $val
28 */
29 public function setRawMimeDirValue($val)
30 {
31 $val = 'TRUE' === strtoupper($val) ? true : false;
32 $this->setValue($val);
33 }
34
35 /**
36 * Returns a raw mime-dir representation of the value.
37 *
38 * @return string
39 */
40 public function getRawMimeDirValue()
41 {
42 return $this->value ? 'TRUE' : 'FALSE';
43 }
44
45 /**
46 * Returns the type of value.
47 *
48 * This corresponds to the VALUE= parameter. Every property also has a
49 * 'default' valueType.
50 *
51 * @return string
52 */
53 public function getValueType()
54 {
55 return 'BOOLEAN';
56 }
57
58 /**
59 * Hydrate data from a XML subtree, as it would appear in a xCard or xCal
60 * object.
61 */
62 public function setXmlValue(array $value)
63 {
64 $value = array_map(
65 function ($value) {
66 return 'true' === $value;
67 },
68 $value
69 );
70 parent::setXmlValue($value);
71 }
72 }
73