FreenetIS
 All Classes Namespaces Functions Variables Pages
Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Tatra_Banka_Statement_File_Importer Class Reference

Tatra banka abstract importer that handles storing of transfers. More...

Inheritance diagram for Tatra_Banka_Statement_File_Importer:
Bank_Statement_File_Importer Txt_Tatra_Banka_Statement_File_Importer

Public Attributes

const LAST_DOWNLOAD_SETTINGS_KEY = 'last_download'
- Public Attributes inherited from Bank_Statement_File_Importer
const DIR = 'importers'
 Dir with driver classes.

Protected Member Functions

 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.
 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.
 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.

Static Protected Member Functions

static remove_zeros ($value)
 Removes zeros on beginning of string (symbols or account)
- 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.

Protected Attributes

 $data = array()
 $last_download_datetime

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.

Detailed Description

Tatra banka abstract importer that handles storing of transfers.

Subclass add method for handling different input file types and format.

Author
David Raška

Member Function Documentation

static Tatra_Banka_Statement_File_Importer::remove_zeros (   $value)
staticprotected

Removes zeros on beginning of string (symbols or account)

Parameters
$value
Returns
string
Tatra_Banka_Statement_File_Importer::store ( $stats = array())
protected

Stores data that are obtain via parse_file_data method (stored internally.

  • so it is in hand of the implemented file importer).

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.

Parameters
array$statsStatistics about imported statement
Returns
Bank_statement_Model Bank statement that was stored or NULL if bank statement was not stored
Exceptions
Duplicity_ExceptionOn transfers that were already imported

Reimplemented from Bank_Statement_File_Importer.


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