PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.4
Booking for Appointments and Events Calendar – Amelia v2.4.4
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 / IntegerValue.php
ameliabooking / vendor / sabre / vobject / lib / Property Last commit date
ICalendar 6 months ago VCard 6 months ago Binary.php 6 months ago Boolean.php 6 months ago FlatText.php 6 months ago FloatValue.php 6 months ago IntegerValue.php 6 months ago Text.php 6 months ago Time.php 6 months ago Unknown.php 6 months ago Uri.php 6 months ago UtcOffset.php 6 months ago
IntegerValue.php
77 lines
1 <?php
2
3 namespace AmeliaVendor\Sabre\VObject\Property;
4
5 use AmeliaVendor\Sabre\VObject\Property;
6
7 /**
8 * Integer property.
9 *
10 * This object represents INTEGER values. These are always a single integer.
11 * They may be preceded by either + or -.
12 *
13 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
14 * @author Evert Pot (http://evertpot.com/)
15 * @license http://sabre.io/license/ Modified BSD License
16 */
17 class IntegerValue extends Property
18 {
19 /**
20 * Sets a raw value coming from a mimedir (iCalendar/vCard) file.
21 *
22 * This has been 'unfolded', so only 1 line will be passed. Unescaping is
23 * not yet done, but parameters are not included.
24 *
25 * @param string $val
26 */
27 public function setRawMimeDirValue($val)
28 {
29 $this->setValue((int) $val);
30 }
31
32 /**
33 * Returns a raw mime-dir representation of the value.
34 *
35 * @return string
36 */
37 public function getRawMimeDirValue()
38 {
39 return $this->value;
40 }
41
42 /**
43 * Returns the type of value.
44 *
45 * This corresponds to the VALUE= parameter. Every property also has a
46 * 'default' valueType.
47 *
48 * @return string
49 */
50 public function getValueType()
51 {
52 return 'INTEGER';
53 }
54
55 /**
56 * Returns the value, in the format it should be encoded for json.
57 *
58 * This method must always return an array.
59 *
60 * @return array
61 */
62 public function getJsonValue()
63 {
64 return [(int) $this->getValue()];
65 }
66
67 /**
68 * Hydrate data from a XML subtree, as it would appear in a xCard or xCal
69 * object.
70 */
71 public function setXmlValue(array $value)
72 {
73 $value = array_map('intval', $value);
74 parent::setXmlValue($value);
75 }
76 }
77