PHP Class Symfony\Component\Validator\ConstraintViolationList

Author: Bernhard Schussek ([email protected])
Inheritance: implements IteratorAggregate, implements Countable, implements ArrayAccess
ファイルを表示 Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Property Type Description
$violations array The constraint violations

Public Methods

Method Description
__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.

Method Details

__construct() public method

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

__toString() public method

public __toString ( ) : string
return string

add() public method

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

addAll() public method

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

count() public method

See also: Countable
public count ( )

get() public method

Returns the violation at a given offset.
public get ( integer $offset ) : ConstraintViolation
$offset integer The offset of the violation.
return ConstraintViolation The violation.

getIterator() public method

See also: IteratorAggregate
public getIterator ( )

has() public method

Returns whether the given offset exists.
public has ( integer $offset ) : boolean
$offset integer The violation offset.
return boolean Whether the offset exists.

offsetExists() public method

See also: ArrayAccess
public offsetExists ( $offset )

offsetGet() public method

See also: ArrayAccess
public offsetGet ( $offset )

offsetSet() public method

See also: ArrayAccess
public offsetSet ( $offset, $violation )

offsetUnset() public method

See also: ArrayAccess
public offsetUnset ( $offset )

remove() public method

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

set() public method

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

Property Details

$violations protected_oe property

The constraint violations
protected array $violations
return array