mediatekformation

ConstraintViolationList
in package
implements IteratorAggregate, ConstraintViolationListInterface

Default implementation of {@ConstraintViolationListInterface}.

Tags
author

Bernhard Schussek bschussek@gmail.com

Interfaces, Classes, Traits and Enums

IteratorAggregate
ConstraintViolationListInterface
A list of constraint violations.

Table of Contents

$violations  : array<string|int, ConstraintViolationInterface>
__construct()  : mixed
Creates a new constraint violation list.
__toString()  : string
Converts the violation into a string for debugging purposes.
add()  : mixed
Adds a constraint violation to this list.
addAll()  : mixed
Merges an existing violation list into this list.
count()  : int
findByCodes()  : static
Creates iterator for errors with specific codes.
get()  : ConstraintViolationInterface
Returns the violation at a given offset.
getIterator()  : ArrayIterator|array<string|int, ConstraintViolationInterface>
{@inheritdoc}
has()  : bool
Returns whether the given offset exists.
offsetExists()  : bool
offsetGet()  : mixed
{@inheritdoc}
offsetSet()  : void
{@inheritdoc}
offsetUnset()  : void
{@inheritdoc}
remove()  : mixed
Removes a violation at a given offset.
set()  : mixed
Sets a violation at a given offset.

Properties

Methods

__toString()

Converts the violation into a string for debugging purposes.

public __toString() : string
Return values
string

The violation as string

findByCodes()

Creates iterator for errors with specific codes.

public findByCodes(string|array<string|int, string> $codes) : static
Parameters
$codes : string|array<string|int, string>

The codes to find

Return values
static

new instance which contains only specific errors

has()

Returns whether the given offset exists.

public has(mixed $offset) : bool
Parameters
$offset : mixed

The violation offset

Return values
bool

Whether the offset exists

offsetExists()

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

{@inheritdoc}

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

{@inheritdoc}

public offsetSet(mixed $offset, mixed $violation) : void
Parameters
$offset : mixed
$violation : mixed
Return values
void

offsetUnset()

{@inheritdoc}

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed
Return values
void

remove()

Removes a violation at a given offset.

public remove(mixed $offset) : mixed
Parameters
$offset : mixed

The offset to remove

Return values
mixed

Search results