src/Util/Validator.php
public function data(array $data, array $fields = [])
    {
        // Allows filtering of used input fields against optional second array of field names allowed
        // This is useful for limiting raw $_POST or $_GET data to only known fields
        $this->_fields = $fields !== [] ? \array_intersect_key($data, \array_flip($fields)) : $data;

        return $this;
    }
public function data(array $data, array $fields = [])
    {
        // Allows filtering of used input fields against optional second array of field names allowed
        // This is useful for limiting raw $_POST or $_GET data to only known fields
        $this->_fields = $fields !== [] ? \array_intersect_key($data, \array_flip($fields)) : $data;

        return $this;
    }
public function data ( array $ data , array $ fields = [ ] ) { // Allows filtering of used input fields against optional second array of field names allowed // This is useful for limiting raw $_POST or $_GET data to only known fields $ this -> _fields = $ fields !== [ ] ? \ array_intersect_key ( $ data , \ array_flip ( $ fields ) ) : $ data ; return $ this ; }
Set data for validator

@param  array $data
@param  array $fields

@return $this
Set data for validator