1 | <?php |
||
23 | class Factory implements FactoryInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $options; |
||
29 | |||
30 | /** |
||
31 | * @var OptionsResolver |
||
32 | */ |
||
33 | protected $resolver; |
||
34 | |||
35 | /** |
||
36 | * @param array $options |
||
37 | */ |
||
38 | public function __construct(array $options = array()) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function createSecond(\DateTime $begin) |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function createMinute(\DateTime $begin) |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function createHour(\DateTime $begin) |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function createDay(\DateTime $begin) |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function createWeek(\DateTime $begin) |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function createMonth(\DateTime $begin) |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function createYear(\DateTime $begin) |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function createRange(\DateTime $begin, \DateTime $end) |
||
106 | |||
107 | /** |
||
108 | * @param string $name |
||
109 | * @param mixed $value |
||
110 | */ |
||
111 | public function setOption($name, $value) |
||
117 | |||
118 | /** |
||
119 | * @param string $name |
||
120 | * |
||
121 | * @return mixed |
||
122 | */ |
||
123 | public function getOption($name) |
||
127 | |||
128 | /** |
||
129 | * @param array $options |
||
130 | * |
||
131 | * @return array |
||
132 | */ |
||
133 | protected function resolveOptions(array $options) |
||
155 | |||
156 | /** |
||
157 | * Override this method if you have to change default/allowed options. |
||
158 | * |
||
159 | * @param OptionsResolver $resolver |
||
160 | */ |
||
161 | protected function setDefaultOptions(OptionsResolver $resolver) |
||
164 | |||
165 | /** |
||
166 | * {@inheritdoc} |
||
167 | */ |
||
168 | public function setFirstWeekday($firstWeekday) |
||
172 | |||
173 | /** |
||
174 | * {@inheritdoc} |
||
175 | */ |
||
176 | public function getFirstWeekday() |
||
180 | |||
181 | /** |
||
182 | * {@inheritdoc} |
||
183 | */ |
||
184 | public function findFirstDayOfWeek($dateTime) |
||
192 | } |
||
193 |