Auxiliary class for parsing CSV bank account listings from czech bank "FIO banka".
More...
Public Member Functions |
| parse ($csv, $charset=self::DEFAULT_CHARSET) |
| Parse bank statement in CSV format that is passed as string.
|
| accept_file ($csv, $charset=self::DEFAULT_CHARSET) |
| Check whether parser accept given CSV file.
|
Static Public Member Functions |
static | get_fields () |
| FIO statement columns fields names.
|
static | parseAmount ($amount) |
static | parseDate ($date) |
| Parse date from format DD.MM.YYYY into YYYY-MM-DD.
|
static | transformFileToLineArray ($file_content, $charset) |
| Transforms file content in passed charset into array of its lines encoded in UTF-8 encoding.
|
Detailed Description
Auxiliary class for parsing CSV bank account listings from czech bank "FIO banka".
Listing may be obtain from from the ebanking web application of FIO bank.
The CSV format looks like this: "Datum";"ID operace";"ID pokynu";"KS";"Název banky";"Název protiúčtu"; "Objem";"Měna";"Protiúčet";"Kód banky";"Zadal";"SS";"Typ";"Poznámka"; "VS";"Upřesnění - objem";"Upřesnění - měna";"Zpráva pro příjemce" "Suma";"";"";"";"";"";"-188170,4";"CZK";"";"";"";"";"";"";"";"";"";""
- Author
- Ondřej Fibich fibic.nosp@m.h@fr.nosp@m.eenet.nosp@m.is.o.nosp@m.rg
- Since
- 1.1.11
- Todo:
- i18n of error messages
Member Function Documentation
NewFioCsvParser::accept_file |
( |
|
$csv, |
|
|
|
$charset = self::DEFAULT_CHARSET |
|
) |
| |
Check whether parser accept given CSV file.
- Parameters
-
string | $csv | string containing the original csv file. |
string | $charset | optional charset name of file, default is UTF-8 |
- Returns
- boolean
static NewFioCsvParser::get_fields |
( |
| ) |
|
|
static |
FIO statement columns fields names.
- Returns
- array
NewFioCsvParser::parse |
( |
|
$csv, |
|
|
|
$charset = self::DEFAULT_CHARSET |
|
) |
| |
Parse bank statement in CSV format that is passed as string.
- Parameters
-
string | $csv | string containing the original csv file. |
string | $charset | optional charset name of file, default is UTF-8 |
- Returns
- array[array] Integer-indexed array of associative arrays. Each associative array represents one line of the CSV
- Exceptions
-
static NewFioCsvParser::parseDate |
( |
|
$date | ) |
|
|
static |
Parse date from format DD.MM.YYYY into YYYY-MM-DD.
- Parameters
-
string | $date | in format DD.MM.YYYY |
- Returns
- string date in format YYYY-MM-DD
- Exceptions
-
InvalidArgumentException | on invalid date format |
static NewFioCsvParser::transformFileToLineArray |
( |
|
$file_content, |
|
|
|
$charset |
|
) |
| |
|
static |
Transforms file content in passed charset into array of its lines encoded in UTF-8 encoding.
This function must handle differences of end of line separators on all platforms.
- Parameters
-
string | $file_content | file countent to be transformed |
string | $charset | charset of file content |
- Returns
- array array of lines in UTF-8 charset
The documentation for this class was generated from the following file: