Compose (class)

Simple class for composing stuff from other stuff, i.e. some helpers.

Methods

bytesToHuman($bytes, $decimals = 2, $divider = 1024) static

Bytes to human readable form. For divider 1000 postfix can be B, kB, MB and so on. For divider 1024 postfix can be B, kiB, MiB and so on.

slug($value) static

Generate slug from a string.

unique($length = 8, $chars = false) static

Create unique string.

UUIDv4() static

Create random UUID, version 4.