Dataformat utility class.
More...
|
static | download_data (string $filename, string $dataformat, array $columns, Iterable $iterator, callable $callback=null) |
| Sends a formatted data file to the browser. More...
|
|
static | write_data (string $filename, string $dataformat, array $columns, Iterable $iterator, callable $callback=null) |
| Writes a formatted data file with specified filename. More...
|
|
Dataformat utility class.
- Copyright
- 2020 Paul Holden paulh.nosp@m.@moo.nosp@m.dle.c.nosp@m.om
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ download_data()
static core\dataformat::download_data |
( |
string |
$filename, |
|
|
string |
$dataformat, |
|
|
array |
$columns, |
|
|
Iterable |
$iterator, |
|
|
callable |
$callback = null |
|
) |
| |
|
static |
Sends a formatted data file to the browser.
- Parameters
-
string | $filename | |
string | $dataformat | |
array | $columns | |
Iterable | $iterator | |
callable | null | $callback | Optional callback method to apply to each record prior to writing, which accepts two parameters as such: function($record, bool $supportshtml) returning formatted record |
- Exceptions
-
◆ get_format_instance()
static core\dataformat::get_format_instance |
( |
string |
$dataformat | ) |
|
|
staticprotected |
Return an instance of a dataformat writer from given dataformat type.
- Parameters
-
- Return values
-
- Exceptions
-
◆ write_data()
static core\dataformat::write_data |
( |
string |
$filename, |
|
|
string |
$dataformat, |
|
|
array |
$columns, |
|
|
Iterable |
$iterator, |
|
|
callable |
$callback = null |
|
) |
| |
|
static |
Writes a formatted data file with specified filename.
- Parameters
-
string | $filename | |
string | $dataformat | |
array | $columns | |
Iterable | $iterator | |
callable | null | $callback | |
- Return values
-
string | Complete path to the file on disk |
The documentation for this class was generated from the following file: