src/GuillermoMartinez/Filemanager/Filemanager.php
private function sanitizeNameFolder($var,$strict=false) {
        $sanitized = strip_tags($var);
        $sanitized = str_replace('.', '', $sanitized);
        $sanitized = preg_replace('@(\/)+@', '/', $sanitized);
        if($strict){
            if(substr($sanitized,-1)=='/') $sanitized = substr($sanitized,0,-1);
        }
        return $sanitized;
    }
private function sanitizeNameFolder($var,$strict=false) {
        $sanitized = strip_tags($var);
        $sanitized = str_replace('.', '', $sanitized);
        $sanitized = preg_replace('@(\/)+@', '/', $sanitized);
        if($strict){
            if(substr($sanitized,-1)=='/') $sanitized = substr($sanitized,0,-1);
        }
        return $sanitized;
    }
private function sanitizeNameFolder ( $ var , $ strict = false ) { $ sanitized = strip_tags ( $ var ) ; $ sanitized = str_replace ( '.' , '' , $ sanitized ) ; $ sanitized = preg_replace ( '@(\/)+@' , '/' , $ sanitized ) ; if ( $ strict ) { if ( substr ( $ sanitized , - 1 ) == '/' ) $ sanitized = substr ( $ sanitized , 0 , - 1 ) ; } return $ sanitized ; }
Clear name folder
@param string $var
@return string
Clear name folder