public function standardizeFileName($name, $asArray = false)
    {
        $name = mb_strtolower($name);
        $ext = $this->getExt($name);
        if ($ext) {
            $pos = strpos($name, $ext);
            if ($pos > 0) {
                $name = substr($name, 0, $pos);
            }
        }
        $name = $this->urlify($name);

        return $asArray ? [
            $name,
            $ext,
        ] : $name.'.'.$ext;
    }
public function standardizeFileName($name, $asArray = false)
    {
        $name = mb_strtolower($name);
        $ext = $this->getExt($name);
        if ($ext) {
            $pos = strpos($name, $ext);
            if ($pos > 0) {
                $name = substr($name, 0, $pos);
            }
        }
        $name = $this->urlify($name);

        return $asArray ? [
            $name,
            $ext,
        ] : $name.'.'.$ext;
    }
public function standardizeFileName ( $ name , $ asArray = false ) { $ name = mb_strtolower ( $ name ) ; $ ext = $ this -> getExt ( $ name ) ; if ( $ ext ) { $ pos = strpos ( $ name , $ ext ) ; if ( $ pos > 0 ) { $ name = substr ( $ name , 0 , $ pos ) ; } } $ name = $ this -> urlify ( $ name ) ; return $ asArray ? [ $ name , $ ext , ] : $ name . '.' . $ ext ; }
Standardize filename using urlify function and keeping the extension.

@param string $name    Original filename
@param bool   $asArray Indicates if the return should be an array or a string

@return string
Standardize filename using urlify function and keeping the extension .