PHP Класс Symfony\Component\Validator\ConstraintViolationList

Автор: Bernhard Schussek ([email protected])
Наследование: implements IteratorAggregate, implements Countable, implements ArrayAccess
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$violations array The constraint violations

Открытые методы

Метод Описание
__construct ( array $violations = [] ) Creates a new constraint violation list.
__toString ( ) : string
add ( ConstraintViolation $violation ) Add a ConstraintViolation to this list.
addAll ( ConstraintViolationList $otherList ) Merge an existing ConstraintViolationList into this list.
count ( )
get ( integer $offset ) : ConstraintViolation Returns the violation at a given offset.
getIterator ( )
has ( integer $offset ) : boolean Returns whether the given offset exists.
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $violation )
offsetUnset ( $offset )
remove ( integer $offset ) Removes a violation at a given offset.
set ( integer $offset, ConstraintViolation $violation ) Sets a violation at a given offset.

Описание методов

__construct() публичный Метод

Creates a new constraint violation list.
public __construct ( array $violations = [] )
$violations array The constraint violations to add to the list

__toString() публичный Метод

public __toString ( ) : string
Результат string

add() публичный Метод

Add a ConstraintViolation to this list.
public add ( ConstraintViolation $violation )
$violation ConstraintViolation

addAll() публичный Метод

Merge an existing ConstraintViolationList into this list.
public addAll ( ConstraintViolationList $otherList )
$otherList ConstraintViolationList

count() публичный Метод

См. также: Countable
public count ( )

get() публичный Метод

Returns the violation at a given offset.
public get ( integer $offset ) : ConstraintViolation
$offset integer The offset of the violation.
Результат ConstraintViolation The violation.

getIterator() публичный Метод

См. также: IteratorAggregate
public getIterator ( )

has() публичный Метод

Returns whether the given offset exists.
public has ( integer $offset ) : boolean
$offset integer The violation offset.
Результат boolean Whether the offset exists.

offsetExists() публичный Метод

См. также: ArrayAccess
public offsetExists ( $offset )

offsetGet() публичный Метод

См. также: ArrayAccess
public offsetGet ( $offset )

offsetSet() публичный Метод

См. также: ArrayAccess
public offsetSet ( $offset, $violation )

offsetUnset() публичный Метод

См. также: ArrayAccess
public offsetUnset ( $offset )

remove() публичный Метод

Removes a violation at a given offset.
public remove ( integer $offset )
$offset integer The offset to remove.

set() публичный Метод

Sets a violation at a given offset.
public set ( integer $offset, ConstraintViolation $violation )
$offset integer The violation offset.
$violation ConstraintViolation The violation.

Описание свойств

$violations защищенное свойство

The constraint violations
protected array $violations
Результат array