Tabla de Contenidos

Tema anterior

< Class Phalcon\Validation\Message

Próximo tema

Class Phalcon\Validation\Validator >

Esta página

Class Phalcon\Validation\Message\Group

implements Countable, ArrayAccess, Iterator, Traversable

Represents a group of validation messages


public __construct ([array $messages])

Phalcon\Validation\Message\Group constructor

public Phalcon\Validation\Message offsetGet (string $index)

Gets an attribute a message using the array syntax



public offsetSet (string $index, Phalcon\Validation\Message $message)

Sets an attribute using the array-syntax


 $messages[0] = new Phalcon\Validation\Message('This is a message');

public boolean offsetExists (string $index)

Checks if an index exists



public offsetUnset (string $index)

Removes a message from the list



public appendMessage (Phalcon\Validation\MessageInterface $message)

Appends a message to the group


 $messages->appendMessage(new Phalcon\Validation\Message('This is a message'));

public appendMessages (Phalcon\Validation\MessageInterface[] $messages)

Appends an array of messages to the group



public int count ()

Returns the number of messages in the list

public rewind ()

Rewinds the internal iterator

public Phalcon\Validation\Message current ()

Returns the current message in the iterator

public int key ()

Returns the current position/key in the iterator

public next ()

Moves the internal iteration pointer to the next position

public boolean valid ()

Check if the current message the iterator is valid

public static Phalcon\Mvc\Model\Message\Group __set_state (array $group)

Magic __set_state helps to re-build messages variable exporting