private function validateFields()
    {
        $fields = (array) $this->fields;

        if (empty($fields)) {
            throw new Exception\InvalidArgumentException('Provided fields list was empty!');
        }

        foreach ($fields as $key => $field) {
            if (! is_string($field)) {
                throw new Exception\InvalidArgumentException(
                    sprintf('Provided fields must be strings, %s provided for key %s', gettype($field), $key)
                );
            }
        }

        $this->fields = array_values($fields);
    }
private function validateFields()
    {
        $fields = (array) $this->fields;

        if (empty($fields)) {
            throw new Exception\InvalidArgumentException('Provided fields list was empty!');
        }

        foreach ($fields as $key => $field) {
            if (! is_string($field)) {
                throw new Exception\InvalidArgumentException(
                    sprintf('Provided fields must be strings, %s provided for key %s', gettype($field), $key)
                );
            }
        }

        $this->fields = array_values($fields);
    }
private function validateFields ( ) { $ fields = ( array ) $ this -> fields ; if ( empty ( $ fields ) ) { throw new Exception \ InvalidArgumentException ( 'Provided fields list was empty!' ) ; } foreach ( $ fields as $ key => $ field ) { if ( ! is_string ( $ field ) ) { throw new Exception \ InvalidArgumentException ( sprintf ( 'Provided fields must be strings, %s provided for key %s' , gettype ( $ field ) , $ key ) ) ; } } $ this -> fields = array_values ( $ fields ) ; }
Filters and validates the fields passed to the constructor

@throws \Zend\Validator\Exception\InvalidArgumentException
@return array
Filters and validates the fields passed to the constructor