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

Bank account settings enables to store different types of settings to bank account (e.g. More...

Inheritance diagram for Bank_Account_Settings:
Fio_Bank_Account_Settings Raiffeisenbank_Bank_Account_Settings Tatrabanka_Bank_Account_Settings Unicredit_Bank_Account_Settings

Public Member Functions

 can_download_statements_automatically ()
 Can be bank statements automatically downloaded (using API) in this type of bank?
 get_download_statement_type ()
 Gets download statement type (e.g.
 get_download_base_url ()
 Gets base download URL (e.g.
 get_download_statement_url ()
 Gets download URL for statement (e.g.
 can_import_statements ()
 Can be bank statements imported in this type of bank?
 get_column_fields ()
 Gets fields array (key is a name of field and value contains a another array with fields type, name, help, rules, etc.)
 get_column_data ()
 Gets settings data in JSON format.
 load_column_data ($json)
 Loads data settings from a given JSON data.
 __isset ($column)
 Checks if the column exists in the column data.
 __get ($column)
 Gets value from the column data.
 __set ($column, $data)
 Sets value from the column data.

Static Public Member Functions

static factory ($type)
 Creates bank account setting for bank account with given type.

Public Attributes

const DIR = 'bank_account_settings'
 Dir with driver classes.
const FIELD_TYPE_INT = 'integer'
 Integer type.
const FIELD_TYPE_BOOL = 'boolean'
 Integer type.
const FIELD_TYPE_STRING = 'string'
 String type.
const FIELD_TYPE_DROPDOWN = 'dropdown'
 Dropdown type.
const FIELD_TYPE_DATESELECT = 'dateselect'
 Dateselect type.

Detailed Description

Bank account settings enables to store different types of settings to bank account (e.g.

API key) in order to type of the bank account.

Types of bank account are specified at Bank_Account_Model database entity.

Author
Ondrej Fibich
See Also
Bank_Account_Model

Member Function Documentation

Bank_Account_Settings::__get (   $column)

Gets value from the column data.

Parameters
string$columnColumn name
Exceptions
InvalidArgumentExceptionOn invalid column
Bank_Account_Settings::__isset (   $column)

Checks if the column exists in the column data.

Parameters
string$columnColumn name
Returns
boolean
Bank_Account_Settings::__set (   $column,
  $data 
)

Sets value from the column data.

Parameters
string$columnColumn name
mixed$data
Exceptions
InvalidArgumentExceptionOn invalid column or invalid data format
Bank_Account_Settings::can_download_statements_automatically ( )
abstract

Can be bank statements automatically downloaded (using API) in this type of bank?

Returns
boolean

Reimplemented in Tatrabanka_Bank_Account_Settings, Fio_Bank_Account_Settings, Raiffeisenbank_Bank_Account_Settings, and Unicredit_Bank_Account_Settings.

Bank_Account_Settings::can_import_statements ( )
abstract

Can be bank statements imported in this type of bank?

Returns
boolean

Reimplemented in Tatrabanka_Bank_Account_Settings, Fio_Bank_Account_Settings, Raiffeisenbank_Bank_Account_Settings, and Unicredit_Bank_Account_Settings.

static Bank_Account_Settings::factory (   $type)
static

Creates bank account setting for bank account with given type.

If an new bank account type will be added, it must be added also to this method.

Parameters
integer$typetype of bank account (from ORM model)
Returns
BankAccountSettings An instance of driver
Exceptions
InvalidArgumentExceptionOn unknown type
Bank_Account_Settings::get_column_data ( )

Gets settings data in JSON format.

This method is used for retrieving new value in order to store it into a database table.

Returns
array Settings
Bank_Account_Settings::get_column_fields ( )
abstract

Gets fields array (key is a name of field and value contains a another array with fields type, name, help, rules, etc.)

Returns
array Fields array

Reimplemented in Tatrabanka_Bank_Account_Settings, Fio_Bank_Account_Settings, Raiffeisenbank_Bank_Account_Settings, and Unicredit_Bank_Account_Settings.

Bank_Account_Settings::get_download_base_url ( )

Gets base download URL (e.g.

http://mbank/) Valid only if download is enabled.

Override this method in order to support auto downloading of statements.

See Also
Bank_Account_Settings::can_download_statements_automatically()
Returns
string URL string
Exceptions
InvalidArgumentExceptionOn invalid settings (e.g. API token)

Reimplemented in Fio_Bank_Account_Settings.

Bank_Account_Settings::get_download_statement_type ( )

Gets download statement type (e.g.

csv, json). Valid only if download is enabled. Tells what file type is espected as result of download. This type is later use for detection of importer for statement.

Override this method in order to support auto downloading of statements.

See Also
Bank_Account_Settings::can_download_statements_automatically()
Returns
string

Reimplemented in Tatrabanka_Bank_Account_Settings, and Fio_Bank_Account_Settings.

Bank_Account_Settings::get_download_statement_url ( )

Gets download URL for statement (e.g.

http://mbank/json/transactions) Valid only if download is enabled. The statment for the bank account is downloaded from this URL.

This method may use get_download_base_url() method for obtaining of base URL path.

Override this method in order to support auto downloading of statements.

See Also
Bank_Account_Settings::can_download_statements_automatically()
Returns
string URL string
Exceptions
InvalidArgumentExceptionOn invalid settings (e.g. API token)

Reimplemented in Tatrabanka_Bank_Account_Settings, and Fio_Bank_Account_Settings.

Bank_Account_Settings::load_column_data (   $json)

Loads data settings from a given JSON data.

Parameters
stringJSON data

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