class Export

Export Helper

Properties

$export_handler

Methods

__construct()

No description

UniversalFeedCreator
get_feedcreator()

No description

array
get_table_formats()

No description

string
table(array $data_array, string $format, array $options = array())

No description

table_as_file(array $data_array, string $format = 'csv', array $options = array())

No description

Details

at line 60
__construct()

No description

at line 201
UniversalFeedCreator get_feedcreator()

No description

Return Value

UniversalFeedCreator

at line 189
array get_table_formats()

No description

Return Value

array

Array with the format identifier (e.g. csv) and the full name

at line 166
string table(array $data_array, string $format, array $options = array())

No description

Parameters

array $data_array

Data array with headers in first line

string $format

ID of the file format (e.g. csv) - get all available formats with get_table_formats()

array $options

Optional parameters

  • encoding: ISO or CP1252: The expected data has to be UTF-8 encoded. The result will be then encoded to ISO or CP1252 if set. CSV export
  • separator: Column separator - default: ;
  • text_sep: Text enclosing - default: " HTML / Excel export
  • title: HTML title set in the tag - default: Export</li> <li>skip_html_start: If true no <html>, <body> and <table> tags are written</li> <li>skip_html_end: if true, no <html>, <body> and <table> closing tags are written</li> </ul></td> </tr> </table> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>string</td> <td><p>The export data</p></td> </tr> </table> </div> </div> </div> <div class="method-item"> <h3 id="method_table_as_file"> <div class="location">at line 111</div> <code> <strong>table_as_file</strong>(array $data_array, string $format = 'csv', array $options = array()) </code> </h3> <div class="details"> <div class="method-description"> <p class="no-description">No description</p> </div> <div class="tags"> <h4>Parameters</h4> <table class="table table-condensed"> <tr> <td>array</td> <td>$data_array</td> <td><p>Data array with headers in first line</p></td> </tr> <tr> <td>string</td> <td>$format</td> <td><p>ID of the file format (e.g. csv) - get all available formats with get_table_formats()</p></td> </tr> <tr> <td>array</td> <td>$options</td> <td><p>Optional parameters: $this->table(). Additional options:</p> <ul> <li>filename: The name for the download with the extension</li> <li>return_contents: if true, returns the export like $this->table()</li> </ul></td> </tr> </table> </div> </div> </div> </div> </div><div id="footer"> Generated by <a href="https://github.com/code-lts/doctum">Doctum, a API Documentation generator and fork of Sami</a>.</div></div> </div> </body> </html>