FIO abstract importer that handles storing of transfers. More...
Protected Member Functions | |
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. | |
get_parsed_transactions () | |
Gets parsed data. | |
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. | |
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. | |
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. |
FIO abstract importer that handles storing of transfers.
Subclass add method for handling different input file types and format.
|
protected |
This method may be implemented in order to do some action before downloading of a bank statement.
Does not do anything by default.
Bank_account_Model | $bank_account | |
Bank_Account_Settings | $settings |
Exception | On any error |
Reimplemented from Bank_Statement_File_Importer.
|
abstractprotected |
Gets parsed data.
Reimplemented in Csv_Fio_Bank_Statement_File_Importer, and Json_Fio_Bank_Statement_File_Importer.
|
protected |
Stores data that are obtain via parse_file_data method (stored internally.
All transfers are stored in the database and grouped using statement entity. This statement entity is than returned.
This method should also set affected members in order to notify them.
An error in the format may be add into error stack (addError) that is later displayed to user if this function returns FALSE.
array | $stats | Statistics about imported statement |
Duplicity_Exception | On transfers that were already imported |
Reimplemented from Bank_Statement_File_Importer.