ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
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 
26 {
27  public function makePresentable(DataInterface $data): string;
28 
29  public function makePresentableAsList(string $separator, DataInterface ...$data): string;
30 
39  public function durationToArray(string $duration): array;
40 
46  public function durationToSeconds(string $duration): int;
47 
54  public function datetimeToObject(string $datetime): \DateTimeImmutable;
55 
60  public function durationFromIntegers(
61  ?int $years,
62  ?int $months,
63  ?int $days,
64  ?int $hours,
65  ?int $minutes,
66  ?int $seconds
67  ): string;
68 
74  public function datetimeFromObject(\DateTimeImmutable $object): string;
75 
81  public function getAllLanguages(): array;
82 }
datetimeFromObject(\DateTimeImmutable $object)
Translates datetime objects to strings in the LOM-internal datetime format.
durationToArray(string $duration)
Translates strings in the LOM-internal duration format to arrays consisting of in order years...
getAllLanguages()
Returns all languages that can be selected in LOM in ILIAS.
durationToSeconds(string $duration)
Translates strings in the LOM-internal duration format to seconds.
$datetime
$duration
makePresentableAsList(string $separator, DataInterface ... $data)
datetimeToObject(string $datetime)
Translates strings in the LOM-internal datetime format to datetime objects.
durationFromIntegers(?int $years, ?int $months, ?int $days, ?int $hours, ?int $minutes, ?int $seconds)
Get a string in the LOM-internal duration format as specified by the provided integers.