1<?php 2 3namespace 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 */ 18class 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