Свойство | Тип | Описание | |
---|---|---|---|
$translator |
Метод | Описание | |
---|---|---|
__construct ( Symfony\Component\Translation\TranslatorInterface $translator ) | Constructor | |
formatDiff ( DateTimeInterface $from, DateTimeInterface $to ) : string | Returns a formatted diff for the given from and to datetimes | |
getDiffMessage ( integer $count, boolean $invert, integer $unit ) : string | Returns the diff message for the specified count and unit | |
getEmptyDiffMessage ( ) : string | Returns the message for an empty diff |
Метод | Описание | |
---|---|---|
doGetDiffMessage ( $count, $invert, $unit ) |
public __construct ( Symfony\Component\Translation\TranslatorInterface $translator ) | ||
$translator | Symfony\Component\Translation\TranslatorInterface | Translator used for messages |
public formatDiff ( DateTimeInterface $from, DateTimeInterface $to ) : string | ||
$from | DateTimeInterface | |
$to | DateTimeInterface | |
Результат | string |
public getEmptyDiffMessage ( ) : string | ||
Результат | string |