diff options
author | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
commit | 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 (patch) | |
tree | 75be5fba4368472fb11c8015aee026b2b9a71888 /includes/ical/src/EventsList.php | |
parent | 8cc1f13c17fa2fb5a4410542d39e650e02945634 (diff) | |
download | pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.gz pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.bz2 pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.zip |
Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated)
Diffstat (limited to 'includes/ical/src/EventsList.php')
-rw-r--r-- | includes/ical/src/EventsList.php | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/includes/ical/src/EventsList.php b/includes/ical/src/EventsList.php deleted file mode 100644 index 3325368..0000000 --- a/includes/ical/src/EventsList.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -namespace om; - -/** - * Copyright (c) 2004-2022 Roman Ožana (https://ozana.cz) - * - * @license BSD-3-Clause - * @author Roman Ožana <roman@ozana.cz> - */ -class EventsList extends \ArrayObject { - - /** - * Return array of Events - * - * @return array - */ - public function getArrayCopy(): array { - return array_values(parent::getArrayCopy()); - } - - /** - * Return sorted EventList (the newest dates are first) - * - * @return $this - */ - public function sorted(): EventsList { - $this->uasort(static function ($a, $b): int { - if ($a['DTSTART'] === $b['DTSTART']) { - return 0; - } - return ($a['DTSTART'] < $b['DTSTART']) ? -1 : 1; - }); - - return $this; - } - - /** - * Return reversed sorted EventList (the oldest dates are first) - * - * @return $this - */ - public function reversed(): EventsList { - $this->uasort(static function ($a, $b): int { - if ($a['DTSTART'] === $b['DTSTART']) { - return 0; - } - return ($a['DTSTART'] > $b['DTSTART']) ? -1 : 1; - }); - - return $this; - } - -}
\ No newline at end of file |