Slug
in package
implements
Stringable
FinalYes
Tags
Table of Contents
Interfaces
- Stringable
Constants
- SLUG_MAX_LENGTH : int = 255
- SLUG_MIN_LENGTH : int = 1
- SLUG_REGEX : string = '^(([a-z0-9])-?)*(?2)+$'
Properties
- $value : string
Methods
- __construct() : mixed
- __toString() : string
- transform() : string
Constants
SLUG_MAX_LENGTH
public
int
SLUG_MAX_LENGTH
= 255
SLUG_MIN_LENGTH
public
int
SLUG_MIN_LENGTH
= 1
SLUG_REGEX
public
string
SLUG_REGEX
= '^(([a-z0-9])-?)*(?2)+$'
Properties
$value
private
string
$value
Methods
__construct()
public
__construct(string $value[, bool $transform = false ][, bool $allowEmpty = false ]) : mixed
Parameters
- $value : string
- $transform : bool = false
- $allowEmpty : bool = false
__toString()
public
__toString() : string
Attributes
- #[Override]
Return values
stringtransform()
public
static transform(string $value) : string
Parameters
- $value : string