## Class mr_file_export_abstract

Description

MR File Export Abstract

Base class for all exporters. Not all exporters can support the generation of files.

- author: Mark Nielsen
- abstract:

Located in /file/export/abstract.php (line 41)

    mr_plugin
       |
       --mr_file_export_abstract

Direct descendents

Class | Description
--- | ---
mr_file_export_spreadsheet_abstract | MR File Export Spreadsheet Abstract
mr_file_export_text_abstract | MR File Export Text Abstract

Method Summary
void add_row (array $row)
void cleanup ()
mixed close ()
boolean generates_file ()
string get_component ()
string get_extension ()
void init (string $name)
int max_rows ()
void set_headers (array $headers)
string type ()
Methods
add_row (line 113)

Add a row to the export

- abstract:
- access: public

void add_row (array $row)

- array $row: Row cell values

Redefined in descendants as:

- mr_file_export_spreadsheet_abstract::add_row() : Write the row to the file
- mr_file_export_text_abstract::add_row() : Write the row to the file

cleanup (line 127)

Run any cleanup routines

- access: public

void cleanup ()

Redefined in descendants as:

- mr_file_export_text_abstract::cleanup() : Remove the csv file

close (line 120)

Close the export and return whatever the export generated

- abstract:
- access: public

mixed close ()

Redefined in descendants as:

- mr_file_export_spreadsheet_abstract::close() : Close the file pointer and return file
- mr_file_export_text_abstract::close() : Close the file pointer and return file

generates_file (line 71)

If the export plugin can generate a file or not.

- access: public

boolean generates_file ()

Redefined in descendants as:

- mr_file_export_spreadsheet_abstract::generates_file() : Cannot make files with the lib

get_component (line 49)

Passed to get_string calls.

Implementing abstract mr_plugin::get_component()

- access: public

string get_component ()

Redefinition of:

mr_plugin::get_component()
  Passed to get_string calls.

get_extension (line 97)

Get the file extension generated by the export class

- abstract:
- access: public

string get_extension ()

Redefined in descendants as:

- mr_file_export_spreadsheet_excel::get_extension() : Get the file extension generated by the export class
- mr_file_export_spreadsheet_ods::get_extension() : Get the file extension generated by the export class
- mr_file_export_text_csv::get_extension() : Get the file extension generated by the export class
- mr_file_export_text_tsv::get_extension() : Get the file extension generated by the export class

init (line 90)

Init routines, params can be unique to the plugin

- access: public

void init (string $name)

- string $name: The file name to export to

Redefined in descendants as:

- mr_file_export_spreadsheet_abstract::init() : Open workbook and send to browser
- mr_file_export_text_abstract::init() : Make the directory for the file and open the file pointer

max_rows (line 80)

The max export size that the export plugin can handle

- access: public

int max_rows ()

Redefined in descendants as:

- mr_file_export_spreadsheet_excel::max_rows() : Can only handle 50k
- mr_file_export_spreadsheet_ods::max_rows() : Can only handle 100k

set_headers (line 105)

Header setup

- abstract:
- access: public

void set_headers (array $headers)

- array $headers: Array of header names in correct order

Redefined in descendants as:

- mr_file_export_spreadsheet_abstract::set_headers() : Write headers to the file
- mr_file_export_text_abstract::set_headers() : Write headers to the file

type (line 58)

Returns the plugin's name based on class name

- access: public

string type ()

Redefinition of:

mr_plugin::type()
  Returns the plugin's name based on class name

#### Inherited Methods

Inherited From mr_plugin

> mr_plugin::get_component()
> mr_plugin::name()
> mr_plugin::type()

Documentation generated on Thu, 28 Jun 2012 16:33:44 -0700 by phpDocumentor 1.4.3