public function getExt()
    {
        if (is_null($this->ext) && $this->originFile) {
            $file = basename($this->originFile);
            // Use substr instead of pathinfo, because pathinfo may return error value in unicode
            if (false !== $pos = strrpos($file, '.')) {
                $this->ext = strtolower(substr($file, $pos + 1));
            } else {
                $this->ext = '';
            }
        }
        return $this->ext;
    }
public function getExt()
    {
        if (is_null($this->ext) && $this->originFile) {
            $file = basename($this->originFile);
            // Use substr instead of pathinfo, because pathinfo may return error value in unicode
            if (false !== $pos = strrpos($file, '.')) {
                $this->ext = strtolower(substr($file, $pos + 1));
            } else {
                $this->ext = '';
            }
        }
        return $this->ext;
    }
public function getExt ( ) { if ( is_null ( $ this -> ext ) && $ this -> originFile ) { $ file = basename ( $ this -> originFile ) ; // Use substr instead of pathinfo, because pathinfo may return error value in unicode if ( false !== $ pos = strrpos ( $ file , '.' ) ) { $ this -> ext = strtolower ( substr ( $ file , $ pos + 1 ) ) ; } else { $ this -> ext = '' ; } } return $ this -> ext ; }
Returns the file extension, if file is not exists, return null instead

@return string
Returns the file extension if file is not exists return null instead