Orpheus

FileType extends AbstractType
in package

Table of Contents

Properties

$name  : string
The name
$regex  : string|null
The regex to validate a value

Methods

__construct()  : mixed
Constructor
check()  : bool
Check this value is valid
checkByRegex()  : bool
Check this value if valid using the regex
format()  : mixed
From machine to human
getName()  : string
Get the name
getValueFrom()  : mixed
Get value from input array
isFalsable()  : bool
Is this type falsable ? Only boolean should be
parse()  : mixed
From human to machine Expecting a string but must be idempotent
validate()  : bool
Validate the given value with this type

Properties

$regex

The regex to validate a value

protected string|null $regex

Methods

__construct()

Constructor

public __construct() : mixed

check()

Check this value is valid

public check(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

checkByRegex()

Check this value if valid using the regex

public checkByRegex(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

format()

From machine to human

public format(mixed $value) : mixed
Parameters
$value : mixed

getName()

Get the name

public getName() : string
Return values
string

getValueFrom()

Get value from input array

public getValueFrom(array<string|int, mixed> $values, string $argName, string|null $argAltName) : mixed
Parameters
$values : array<string|int, mixed>
$argName : string
$argAltName : string|null

isFalsable()

Is this type falsable ? Only boolean should be

public isFalsable() : bool
Return values
bool

parse()

From human to machine Expecting a string but must be idempotent

public parse(mixed $value) : mixed
Parameters
$value : mixed

validate()

Validate the given value with this type

public validate(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

							
On this page

Search results