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
FlatText.php
47 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AmeliaVendor\Sabre\VObject\Property; |
| 4 | |
| 5 | /** |
| 6 | * FlatText property. |
| 7 | * |
| 8 | * This object represents certain TEXT values. |
| 9 | * |
| 10 | * Specifically, this property is used for text values where there is only 1 |
| 11 | * part. Semi-colons and colons will be de-escaped when deserializing, but if |
| 12 | * any semi-colons or commas appear without a backslash, we will not assume |
| 13 | * that they are delimiters. |
| 14 | * |
| 15 | * vCard 2.1 specifically has a whole bunch of properties where this may |
| 16 | * happen, as it only defines a delimiter for a few properties. |
| 17 | * |
| 18 | * vCard 4.0 states something similar. An unescaped semi-colon _may_ be a |
| 19 | * delimiter, depending on the property. |
| 20 | * |
| 21 | * @copyright Copyright (C) fruux GmbH (https://fruux.com/) |
| 22 | * @author Evert Pot (http://evertpot.com/) |
| 23 | * @license http://sabre.io/license/ Modified BSD License |
| 24 | */ |
| 25 | class FlatText extends Text |
| 26 | { |
| 27 | /** |
| 28 | * Field separator. |
| 29 | * |
| 30 | * @var string |
| 31 | */ |
| 32 | public $delimiter = ','; |
| 33 | |
| 34 | /** |
| 35 | * Sets the value as a quoted-printable encoded string. |
| 36 | * |
| 37 | * Overriding this so we're not splitting on a ; delimiter. |
| 38 | * |
| 39 | * @param string $val |
| 40 | */ |
| 41 | public function setQuotedPrintableValue($val) |
| 42 | { |
| 43 | $val = quoted_printable_decode($val); |
| 44 | $this->setValue($val); |
| 45 | } |
| 46 | } |
| 47 |