| @@ 39-53 (lines=15) @@ | ||
| 36 | /** |
|
| 37 | * {@inheritDoc} |
|
| 38 | */ |
|
| 39 | public function inPeriod(DateTime $start, DateTime $end) { |
|
| 40 | $objectsInPeriod = new ObjectCollection(); |
|
| 41 | ||
| 42 | foreach ($this->objects as $object) { |
|
| 43 | if ($object->getRepeating() === true) { |
|
| 44 | $objectsInPeriod->add($object); |
|
| 45 | } else { |
|
| 46 | if ($object->isInTimeRange($start, $end)) { |
|
| 47 | $objectsInPeriod->add($object); |
|
| 48 | } |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||
| 52 | return $objectsInPeriod; |
|
| 53 | } |
|
| 54 | ||
| 55 | ||
| 56 | /** |
|
| @@ 59-72 (lines=14) @@ | ||
| 56 | /** |
|
| 57 | * {@inheritDoc} |
|
| 58 | */ |
|
| 59 | public function expand(DateTime $start, DateTime $end) { |
|
| 60 | $expandedObjects = new ObjectCollection(); |
|
| 61 | ||
| 62 | foreach ($this->objects as $object) { |
|
| 63 | if ($object->getRepeating() === true) { |
|
| 64 | $vobject = $object->getVObject(); |
|
| 65 | $vobject->expand($start, $end); |
|
| 66 | $object->setVObject($vobject); |
|
| 67 | $expandedObjects->add($object); |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||
| 71 | return $expandedObjects; |
|
| 72 | } |
|
| 73 | ||
| 74 | ||
| 75 | /** |
|