private function _extract_file_extension()
    {

        if (empty($this->filename)) return false;

        if (!empty($this->mime_type)) {
            $array                = explode('/', $this->mime_type);
            $this->file_extension = array_pop($array);
        } else {
            if (strpos($this->filename, '.') !== false) {
                $array                = explode('/', $this->mime_type);
                $this->file_extension = array_pop($array);
            } else {
                $this->file_extension = 'unknown';
            }
        }

        return true;
    }
private function _extract_file_extension()
    {

        if (empty($this->filename)) return false;

        if (!empty($this->mime_type)) {
            $array                = explode('/', $this->mime_type);
            $this->file_extension = array_pop($array);
        } else {
            if (strpos($this->filename, '.') !== false) {
                $array                = explode('/', $this->mime_type);
                $this->file_extension = array_pop($array);
            } else {
                $this->file_extension = 'unknown';
            }
        }

        return true;
    }
private function _extract_file_extension ( ) { if ( empty ( $ this -> filename ) ) return false ; if ( ! empty ( $ this -> mime_type ) ) { $ array = explode ( '/' , $ this -> mime_type ) ; $ this -> file_extension = array_pop ( $ array ) ; } else { if ( strpos ( $ this -> filename , '.' ) !== false ) { $ array = explode ( '/' , $ this -> mime_type ) ; $ this -> file_extension = array_pop ( $ array ) ; } else { $ this -> file_extension = 'unknown' ; } } return true ; }
extracts the extension of the current file
extracts the extension of the current file