public function match(array $options) {
        if (isset($options['element'])) {
            if (isset($this->data[$options['element']])) {
                if ($this->elementData == $this->data[$options['element']]) {
                    return true;
                }
            } else {
                return true;
            }
        } else if (isset($options['value'])) {
            if ($this->elementData == $options['value']) {
                return true;
            }
        }

        $this->addError($this->checkMessage('Values mismatch', $options));
        return false;
    }
public function match(array $options) {
        if (isset($options['element'])) {
            if (isset($this->data[$options['element']])) {
                if ($this->elementData == $this->data[$options['element']]) {
                    return true;
                }
            } else {
                return true;
            }
        } else if (isset($options['value'])) {
            if ($this->elementData == $options['value']) {
                return true;
            }
        }

        $this->addError($this->checkMessage('Values mismatch', $options));
        return false;
    }
public function match ( array $ options ) { if ( isset ( $ options [ 'element' ] ) ) { if ( isset ( $ this -> data [ $ options [ 'element' ] ] ) ) { if ( $ this -> elementData == $ this -> data [ $ options [ 'element' ] ] ) { return true ; } } else { return true ; } } else if ( isset ( $ options [ 'value' ] ) ) { if ( $ this -> elementData == $ options [ 'value' ] ) { return true ; } } $ this -> addError ( $ this -> checkMessage ( 'Values mismatch' , $ options ) ) ; return false ; }
Checks if the value of the element matches the given option
@param string $name Name of the element to filter
@param  array $options Keys may include [message]
@return boolean
@throws \Exception
Checks if the value of the element matches the given option