src/Components/AbstractSegment.php
protected function sanitizeValue($str)
    {
        if (is_array($str)) {
            foreach ($str as &$value) {
                $value = $this->sanitizeValue($value);
            }
            unset($value);

            return $str;
        }

        $str = filter_var((string) $str, FILTER_UNSAFE_RAW, array('flags' => FILTER_FLAG_STRIP_LOW));
        $str = trim($str);

        return $str;
    }
protected function sanitizeValue($str)
    {
        if (is_array($str)) {
            foreach ($str as &$value) {
                $value = $this->sanitizeValue($value);
            }
            unset($value);

            return $str;
        }

        $str = filter_var((string) $str, FILTER_UNSAFE_RAW, array('flags' => FILTER_FLAG_STRIP_LOW));
        $str = trim($str);

        return $str;
    }
protected function sanitizeValue ( $ str ) { if ( is_array ( $ str ) ) { foreach ( $ str as & $ value ) { $ value = $ this -> sanitizeValue ( $ value ) ; } unset ( $ value ) ; return $ str ; } $ str = filter_var ( ( string ) $ str , FILTER_UNSAFE_RAW , array ( 'flags' => FILTER_FLAG_STRIP_LOW ) ) ; $ str = trim ( $ str ) ; return $ str ; }
Sanitize a string component recursively

@param mixed $str

@return mixed
Sanitize a string component recursively