\Charcoal\ValidatorValidatorResult

A Validator Result object.

Summary

Methods
Properties
Constants
__construct()
setData()
setIdent()
ident()
setLevel()
level()
setMessage()
message()
setTs()
ts()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$ident
$level
$message
$ts
N/A

Properties

$ident

$ident : string

Type

string

$level

$level : string

Can be `notice`, `warning` or `error`

Type

string

$message

$message : string

Type

string

$ts

$ts : \DateTime

Type

\DateTime

Methods

__construct()

__construct(array|\ArrayAccess  $data = null) 

Parameters

array|\ArrayAccess $data

Optional data.

setData()

setData(array  $data) : \Charcoal\Validator\ValidatorResult

Parameters

array $data

The validator result data.

Returns

\Charcoal\Validator\ValidatorResult

Chainable

setIdent()

setIdent(string  $ident) : \Charcoal\Validator\ValidatorResult

Parameters

string $ident

The result identigier.

Throws

\InvalidArgumentException

If parameter is not valid.

Returns

\Charcoal\Validator\ValidatorResult

ident()

ident() : string

Returns

string

setLevel()

setLevel(string  $level) : \Charcoal\Validator\ValidatorResult

Parameters

string $level

The validation level ('notice', 'warning' or 'error').

Throws

\InvalidArgumentException

If parameter is not a valid level.

Returns

\Charcoal\Validator\ValidatorResult

level()

level() : string

Returns

string

setMessage()

setMessage(string  $message) : \Charcoal\Validator\ValidatorResult

Parameters

string $message

The validation message.

Throws

\InvalidArgumentException

If parameter is not valid.

Returns

\Charcoal\Validator\ValidatorResult

message()

message() : string

Returns

string

setTs()

setTs(string|\DateTime  $ts) : \Charcoal\Validator\ValidatorResult

Parameters

string|\DateTime $ts

The datetime value.

Throws

\InvalidArgumentException

If parameter is not valid "datetime".

Returns

\Charcoal\Validator\ValidatorResult

ts()

ts() : \DateTime

Returns

\DateTime