Humanizer
class Humanizer
Makes data more human friendly.
Properties
protected I18n|null | $i18n | I18n instance. |
Methods
string
fileSize(int $size, bool $binary = true)
Returns a human friendly file size.
string
day(DateTimeInterface $dateTime, string $dateFormat = 'Y-m-d, H:i')
Returns a human friendly representation of the date.
string
time(DateTimeInterface $dateTime, string $dateFormat = 'Y-m-d, H:i', string $clockFormat = ', H:i')
Returns a human friendly representation of the time.
Details
at line 37
__construct(I18n|null $i18n = null)
Constructor.
at line 49
string
fileSize(int $size, bool $binary = true)
Returns a human friendly file size.
at line 79
string
day(DateTimeInterface $dateTime, string $dateFormat = 'Y-m-d, H:i')
Returns a human friendly representation of the date.
at line 107
string
time(DateTimeInterface $dateTime, string $dateFormat = 'Y-m-d, H:i', string $clockFormat = ', H:i')
Returns a human friendly representation of the time.