ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
DataHelperInterface.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 {
25  public function matchesDurationPattern(string $string): bool;
26 
27  public function matchesDatetimePattern(string $string): bool;
28 
36  public function durationToIterator(string $duration): \Generator;
37 
38  public function durationToSeconds(string $duration): int;
39 
50  public function datetimeToIterator(string $datetime): \Generator;
51 
52  public function datetimeToObject(string $datetime): \DateTimeImmutable;
53 
54  public function durationFromIntegers(
55  ?int $years,
56  ?int $months,
57  ?int $days,
58  ?int $hours,
59  ?int $minutes,
60  ?int $seconds
61  ): string;
62 
66  public function datetimeFromObject(\DateTimeImmutable $object): string;
67 
71  public function getAllLanguages(): \Generator;
72 }
durationFromIntegers(?int $years, ?int $months, ?int $days, ?int $hours, ?int $minutes, ?int $seconds)
durationToIterator(string $duration)
Returns in sequence years, months, days, hours, minutes, seconds.
$datetime
$duration
datetimeToIterator(string $datetime)
Returns in sequence: YYYY, MM, DD, hh, mm, ss, s (arbitrary many digits for decimal fractions of seco...
datetimeFromObject(\DateTimeImmutable $object)
Note that LOM in ILIAS ignores the time part of any datetimes.