public function merge(VerboseOrChain $validatorChain)
    {
        foreach ($validatorChain->validators->toArray(PriorityQueue::EXTR_BOTH)
                                                                    as $item) {
            $this->attach($item['data']['instance'],
                          $item['data']['show_messages'],
                          $item['data']['leading_message_template'],
                          $item['data']['trailing_message_template'],
                          $item['priority']);
        }
        return $this;
    }
public function merge(VerboseOrChain $validatorChain)
    {
        foreach ($validatorChain->validators->toArray(PriorityQueue::EXTR_BOTH)
                                                                    as $item) {
            $this->attach($item['data']['instance'],
                          $item['data']['show_messages'],
                          $item['data']['leading_message_template'],
                          $item['data']['trailing_message_template'],
                          $item['priority']);
        }
        return $this;
    }
public function merge ( VerboseOrChain $ validatorChain ) { foreach ( $ validatorChain -> validators -> toArray ( PriorityQueue :: EXTR_BOTH ) as $ item ) { $ this -> attach ( $ item [ 'data' ] [ 'instance' ] , $ item [ 'data' ] [ 'show_messages' ] , $ item [ 'data' ] [ 'leading_message_template' ] , $ item [ 'data' ] [ 'trailing_message_template' ] , $ item [ 'priority' ] ) ; } return $ this ; }
Merges in logical "or" validator chain provided as argument.

Priorities of validators within the internal priority queues are
maintained.

Unfortunately this method accesses the OrValidatorChain::validators
property which is protected. This means the type hint for the
$validatorChain argument is restricted to this class. This was borrowed
from Zend\Validator\ValidatorChain and is necessary to obtain the list of
validators as a PriorityQueue so that the validators maintain their
priority when merged in.

A better solution would be to have the getValidators method return a
PriorityQueue instead of an array and have the merge method call the
public getValidators method instead of accessing the protected
validators property. This was not done here in order to keep the API
as close as possible to the API of the Zend\Validator\ValidatorChain
class.

@param OrValidatorChain $validatorChain
@return self
Merges in logical or validator chain provided as argument .