src/Schema.php
private function filterField($value, ValidationField $field, bool &$validated = false) {
        // Check for limited support for Open API style.
        if (!empty($field->val('style')) && is_string($value)) {
            $doFilter = true;
            if ($field->hasType('boolean') && in_array($value, ['true', 'false', '0', '1'], true)) {
                $doFilter = false;
            } elseif (($field->hasType('integer') || $field->hasType('number')) && is_numeric($value)) {
                $doFilter = false;
            }

            if ($doFilter) {
                switch ($field->val('style')) {
                    case 'form':
                        $value = explode(',', $value);
                        break;
                    case 'spaceDelimited':
                        $value = explode(' ', $value);
                        break;
                    case 'pipeDelimited':
                        $value = explode('|', $value);
                        break;
                }
            }
        }

        $value = $this->callFilters($value, $field, $validated);

        return $value;
    }
private function filterField($value, ValidationField $field, bool &$validated = false) {
        // Check for limited support for Open API style.
        if (!empty($field->val('style')) && is_string($value)) {
            $doFilter = true;
            if ($field->hasType('boolean') && in_array($value, ['true', 'false', '0', '1'], true)) {
                $doFilter = false;
            } elseif (($field->hasType('integer') || $field->hasType('number')) && is_numeric($value)) {
                $doFilter = false;
            }

            if ($doFilter) {
                switch ($field->val('style')) {
                    case 'form':
                        $value = explode(',', $value);
                        break;
                    case 'spaceDelimited':
                        $value = explode(' ', $value);
                        break;
                    case 'pipeDelimited':
                        $value = explode('|', $value);
                        break;
                }
            }
        }

        $value = $this->callFilters($value, $field, $validated);

        return $value;
    }
private function filterField ( $ value , ValidationField $ field , bool & $ validated = false ) { // Check for limited support for Open API style. if ( ! empty ( $ field -> val ( 'style' ) ) && is_string ( $ value ) ) { $ doFilter = true ; if ( $ field -> hasType ( 'boolean' ) && in_array ( $ value , [ 'true' , 'false' , '0' , '1' ] , true ) ) { $ doFilter = false ; } elseif ( ( $ field -> hasType ( 'integer' ) || $ field -> hasType ( 'number' ) ) && is_numeric ( $ value ) ) { $ doFilter = false ; } if ( $ doFilter ) { switch ( $ field -> val ( 'style' ) ) { case 'form' : $ value = explode ( ',' , $ value ) ; break ; case 'spaceDelimited' : $ value = explode ( ' ' , $ value ) ; break ; case 'pipeDelimited' : $ value = explode ( '|' , $ value ) ; break ; } } } $ value = $ this -> callFilters ( $ value , $ field , $ validated ) ; return $ value ; }
Filter a field's value using built in and custom filters.

@param mixed $value The original value of the field.
@param ValidationField $field The field information for the field.
@param bool $validated Whether or not a filter validated the value.
@return mixed Returns the filtered field or the original field value if there are no filters.
Filter a field s value using built in and custom filters .