FreenetIS
 All Classes Namespaces Functions Variables Pages
Protected Member Functions | List of all members
Csv_Fio_Bank_Statement_File_Importer Class Reference

FIO importer for statements in CSV format that are obtained from the FIO e-banking portal. More...

Inheritance diagram for Csv_Fio_Bank_Statement_File_Importer:
Fio_Bank_Statement_File_Importer Bank_Statement_File_Importer

Protected Member Functions

 check_file_data_format ()
 Checks whether the file content that is stored into a fileData property has valid format.
 get_header_data ()
 Gets header data of file data format.
 parse_file_data ()
 Parses a file data into a semantic interpretation of its content.
 get_parsed_transactions ()
 Gets parsed data.
- Protected Member Functions inherited from Fio_Bank_Statement_File_Importer
 before_download (Bank_account_Model $bank_account, Bank_Account_Settings $settings)
 This method may be implemented in order to do some action before downloading of a bank statement.
 store (&$stats=array())
 Stores data that are obtain via parse_file_data method (stored internally.
- Protected Member Functions inherited from Bank_Statement_File_Importer
 __construct (Bank_account_Model $bam)
 Creates new instance od bank statement import.
 get_user_id ()
 User ID of caller of this importer.
 get_bank_account ()
 Gets bank account for which the importer is evaulating imports.
 set_file_data ($fd)
 Sets bank statement file data (content of a file)
 get_file_data ()
 Gets bank statement file data (content of a file)
 add_error ($error, $translate=TRUE)
 Adds given error to the start of the error stack.
 add_exception_error (Exception $e, $translate=TRUE)
 Add given exception as error to the start of the error stack.
 add_affected_member ($member_id)
 Adds member as affected by this parsed statement.
 get_errors ()
 Gets error trace.
 find_member_by_vs ($variable_symbol, $error_correction=TRUE)
 Finds member ID by variable method.
 do_download (Bank_account_Model $bank_account, Bank_Account_Settings $settings, $url)
 This method enables to download a bank statement.
 notify_affected_members ()
 Informs affected members by email or SMS according to setting variables inform_affected_member_by_email and inform_affected_member_by_sms.

Additional Inherited Members

- Public Member Functions inherited from Bank_Statement_File_Importer
 get_importer_name ()
 Get importer name.
- Static Public Member Functions inherited from Bank_Statement_File_Importer
static get_drivers ()
 Gets available drivers.
static download (Bank_account_Model $bank_account, Bank_Account_Settings $settings, $send_emails, $send_sms)
 Tries to download statement and then import it.
static import (Bank_account_Model $bank_account, $filename, $ext, $send_emails=TRUE, $send_sms=FALSE)
 Imports a bank statement placed in a file that is given by the filename to bank account that is given by its database model.
- Public Attributes inherited from Bank_Statement_File_Importer
const DIR = 'importers'
 Dir with driver classes.
- Static Protected Member Functions inherited from Bank_Statement_File_Importer
static factory ($bank_account, $ext)
 Creates an instance of file importer driver that is capable of importing bank statement.

Detailed Description

FIO importer for statements in CSV format that are obtained from the FIO e-banking portal.

It uses old version of driver for parsing.

Author
Ondrej Fibich
Since
1.1

Member Function Documentation

Csv_Fio_Bank_Statement_File_Importer::check_file_data_format ( )
protected

Checks whether the file content that is stored into a fileData property has valid format.

This method checks only a format (syntax), semantic meaning of content is examined later.

An error in the format may be add into error stack (addError) that is later displayed to user if this function returns FALSE.

Returns
boolean TRUE if format is corrrent, FALSE otherwise

Reimplemented from Bank_Statement_File_Importer.

Csv_Fio_Bank_Statement_File_Importer::get_header_data ( )
protected

Gets header data of file data format.

This method is used for checking if the bank statement correspondes to bank account in the database.

Data must be available in any time after calling of check_file_data_format method.

An error in the format may be add into error stack (addError) that is later displayed to user if this function returns FALSE.

If bank statement file not providing any header information NULL can be returned to skip assert for bank account match.

Returns
Header_Data|boolean|null

Reimplemented from Bank_Statement_File_Importer.

Csv_Fio_Bank_Statement_File_Importer::get_parsed_transactions ( )
protected

Gets parsed data.

Returns
array Contains array of transactions

Reimplemented from Fio_Bank_Statement_File_Importer.

Csv_Fio_Bank_Statement_File_Importer::parse_file_data ( )
protected

Parses a file data into a semantic interpretation of its content.

This interpretation must be defined by implementing class.

An error in the format may be add into error stack (addError) that is later displayed to user if this function returns FALSE.

Returns
boolean TRUE if file data were succesfully parsed, FALSE otherwise

Reimplemented from Bank_Statement_File_Importer.


The documentation for this class was generated from the following file: