ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
DataHelperInterface.php
Go to the documentation of this file.
1<?php
2
19declare(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}
$datetime
$duration
durationToSeconds(string $duration)
Translates strings in the LOM-internal duration format to seconds.
datetimeFromObject(\DateTimeImmutable $object)
Translates datetime objects to strings in the LOM-internal datetime format.
datetimeToObject(string $datetime)
Translates strings in the LOM-internal datetime format to datetime objects.
getAllLanguages()
Returns all languages that can be selected in LOM in ILIAS.
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.
makePresentableAsList(string $separator, DataInterface ... $data)
durationToArray(string $duration)
Translates strings in the LOM-internal duration format to arrays consisting of in order years,...