CesBank Class Reference

CesBank. More...

Inheritance diagram for CesBank:
CesInteropCENIPBank

Public Member Functions

 acceptTransaction ($transaction_id, $account_id, $force=FALSE)
 Accept a transaction. More...
 
 access ($permission, $object, $objectid, $account=NULL)
 TODO Documentation. More...
 
 activateAccount (array &$record)
 Updates and activates an account. More...
 
 activateExchange (array &$record)
 Updates and activates an exchange. More...
 
 applyTransaction ($transaction_id)
 Applies a transaction given its id. More...
 
 createAccount (array &$record, $send_mail=TRUE)
 Creates a banking account. More...
 
 createExchange (array &$record)
 Create exchange. More...
 
 createLimitChain (array &$record)
 Creates a limit chain object. More...
 
 createPermission (array &$record)
 Create permission object. More...
 
 createTransaction (array &$record)
 Creates a transaction object. More...
 
 deleteAccount ($id)
 Deletes an account. More...
 
 deleteAccountsCheck ($arrayaids, $context= 'account')
 Check if it's possible to delete accounts or exchange. More...
 
 deleteExchange ($id)
 Deletes an exchange. More...
 
 deleteLimitChain ($id)
 Deletes a limit chain. More...
 
 deletePermission ($id)
 Delete permission given its id. More...
 
 deleteTransaction ($id)
 Delete transaction. More...
 
 deleteUsers (array $users)
 Delete or cancel drupal users and all content associated. More...
 
 formatAmount ($amount, $exchange, $symbol=FALSE, $sign=FALSE)
 Formats the amount for an exchange. More...
 
 getAccount ($id)
 Gets a banking account. More...
 
 getAccountByName ($name)
 Gets an account object record by its name. More...
 
 getAccountHistoricBalance ($id, $time)
 Gets an account's historic balance at a certain time point. More...
 
 getAccountHistoricPurchases ($id, $from, $to=NULL)
 Gets an account's historic purchases. More...
 
 getAccountHistoricSales ($id, $from, $to=NULL)
 Gets an account's historic sales. More...
 
 getAdministrablePermissions ($userid=NULL)
 Get the records with permissions for this user id. More...
 
 getAllAccounts (array $conditions=array('state'=> 1), $order=NULL)
 Get all accounts that meet certain conditions. More...
 
 getAllExchanges (array $conditions=array('state'=> 1))
 Gets all exchanges under certain conditions. More...
 
 getAllLimitChains ($exchange_id)
 Get all limit chains object records for this exchange. More...
 
 getCesBankDecoratedTransactionClasses ()
 Get names of classes implementing CesBankDecoratedTransaction interface. More...
 
 getDefaultAccount ($exchange_id)
 Gets default account object record for given exchange. More...
 
 getDefaultExchange ()
 Gets the default exchange object record. More...
 
 getDefaultLimitChain ($exchange_id)
 Gets default limit chain object record. More...
 
 getExchange ($id)
 Gets the exchange from its id. More...
 
 getExchangeByName ($name)
 Gets the exchange object by name. More...
 
 getLimitChain ($id)
 Gets a limit chain object record. More...
 
 getPermission ($id)
 Get the permission object record. More...
 
 getTransaction ($id)
 Get a transaction record. More...
 
 getTransactionAmount (array $transaction, array $exchange)
 Get a transaction amount in a specific exchange currency. More...
 
 getTransactionFromAccount (array $record)
 Get the buyer's account given a transaction. More...
 
 getTransactionLog (array $transaction)
 Return the array of transaction messages for the current transaction state. More...
 
 getTransactions (array $conditions, $order_field= 'created', $order_type= 'ASC')
 Gets transaction object records based on conditions. More...
 
 getTransactionState (array $transaction)
 Get the state of this trasaction. More...
 
 getTransactionToAccount (array $record)
 Get the seller's account given a transaction. More...
 
 getUserAccounts ($uid)
 Get user accounts. More...
 
 rejectTransaction ($transaction_id)
 Reject a transaction. More...
 
 updateAccount (array &$record)
 Updates a banking account. More...
 
 updateCesBankPermission (array &$record)
 Update permission. More...
 
 updateExchange (array &$record)
 Updates the exchange record. More...
 
 updateLimitChain (array &$record)
 Updates a limit chain object. More...
 
 updateTransaction (array &$record)
 Updates the transaction record. More...
 

Protected Member Functions

 getAccountHistoricValue ($id, $field, $from, $to)
 Gets an account's historic value. More...
 
 getObject ($class_name, $id)
 TODO: document. More...
 
 getObjectRecord ($class_name, $id)
 Get record in object based on id with given classname. More...
 
 newTransaction (array &$record)
 Creates a new transaction object based on the record array. More...
 
 notifyTransaction (CesBankTransactionInterface $transaction)
 Notifies the applied transaction. More...
 
 notifyTransactionAccount ($message_key, $account_name, $params)
 Triggers notification for transaction account. More...
 
 transactionFormToRecord ($record)
 Auxiliar. More...
 
 updateObject ($class_name, array &$record)
 Update object in classname with array of records. More...
 

Detailed Description

CesBank.

The controller for all the banking logic. This is the only accessible class from outside this package.


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