src/Components/AbstractComponent.php
protected function sanitizeComponent($str)
    {
        if (is_null($str)) {
            return $str;
        }
        $str = filter_var((string) $str, FILTER_UNSAFE_RAW, array('flags' => FILTER_FLAG_STRIP_LOW));
        $str = trim($str);

        return $str;
    }
protected function sanitizeComponent($str)
    {
        if (is_null($str)) {
            return $str;
        }
        $str = filter_var((string) $str, FILTER_UNSAFE_RAW, array('flags' => FILTER_FLAG_STRIP_LOW));
        $str = trim($str);

        return $str;
    }
protected function sanitizeComponent ( $ str ) { if ( is_null ( $ str ) ) { 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

@param mixed $str

@return string|null
Sanitize a string component