Component
1 year ago
ITip
1 year ago
Parser
1 year ago
Property
1 year ago
Recur
1 year ago
Splitter
1 year ago
TimezoneGuesser
1 year ago
timezonedata
1 year ago
BirthdayCalendarGenerator.php
1 year ago
Cli.php
1 year ago
Component.php
1 year ago
DateTimeParser.php
1 year ago
Document.php
1 year ago
ElementList.php
1 year ago
EofException.php
1 year ago
FreeBusyData.php
1 year ago
FreeBusyGenerator.php
1 year ago
InvalidDataException.php
1 year ago
Node.php
1 year ago
PHPUnitAssertions.php
1 year ago
Parameter.php
1 year ago
ParseException.php
1 year ago
Property.php
1 year ago
Reader.php
1 year ago
Settings.php
1 year ago
StringUtil.php
1 year ago
TimeZoneUtil.php
1 year ago
UUIDUtil.php
1 year ago
VCardConverter.php
1 year ago
Version.php
1 year ago
Writer.php
1 year ago
Settings.php
56 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Sabre\VObject; |
| 4 | |
| 5 | /** |
| 6 | * This class provides a list of global defaults for vobject. |
| 7 | * |
| 8 | * Some of these started to appear in various classes, so it made a bit more |
| 9 | * sense to centralize them, so it's easier for user to find and change these. |
| 10 | * |
| 11 | * The global nature of them does mean that changing the settings for one |
| 12 | * instance has a global influence. |
| 13 | * |
| 14 | * @copyright Copyright (C) fruux GmbH (https://fruux.com/) |
| 15 | * @author Evert Pot (http://evertpot.com/) |
| 16 | * @license http://sabre.io/license/ Modified BSD License |
| 17 | */ |
| 18 | class Settings |
| 19 | { |
| 20 | /** |
| 21 | * The minimum date we accept for various calculations with dates, such as |
| 22 | * recurrences. |
| 23 | * |
| 24 | * The choice of 1900 is pretty arbitrary, but it covers most common |
| 25 | * use-cases. In particular, it covers birthdates for virtually everyone |
| 26 | * alive on earth, which is less than 5 people at the time of writing. |
| 27 | */ |
| 28 | public static $minDate = '1900-01-01'; |
| 29 | |
| 30 | /** |
| 31 | * The maximum date we accept for various calculations with dates, such as |
| 32 | * recurrences. |
| 33 | * |
| 34 | * The choice of 2100 is pretty arbitrary, but should cover most |
| 35 | * appointments made for many years to come. |
| 36 | */ |
| 37 | public static $maxDate = '2100-01-01'; |
| 38 | |
| 39 | /** |
| 40 | * The maximum number of recurrences that will be generated. |
| 41 | * |
| 42 | * This setting limits the maximum of recurring events that this library |
| 43 | * generates in its recurrence iterators. |
| 44 | * |
| 45 | * This is a security measure. Without this, it would be possible to craft |
| 46 | * specific events that recur many, many times, potentially DDOSing the |
| 47 | * server. |
| 48 | * |
| 49 | * The default (3500) allows creation of a daily event that goes on for 10 |
| 50 | * years, which is hopefully long enough for most. |
| 51 | * |
| 52 | * Set this value to -1 to disable this control altogether. |
| 53 | */ |
| 54 | public static $maxRecurrences = 3500; |
| 55 | } |
| 56 |