Property | Type | Description | |
---|---|---|---|
$accountTable | name of the database table, which should store account records. | ||
$db | the DB connection object or the application component ID of the DB connection. After the ManagerDb object is created, if you want to change this property, you should only assign it with a DB connection object. | ||
$transactionTable | name of the database table, which should store transaction records. |
Method | Description | |
---|---|---|
calculateBalance ( $account ) | ||
getAccountIdAttribute ( ) : string | ||
getTransactionIdAttribute ( ) : string | ||
init ( ) | ||
setAccountIdAttribute ( string $accountIdAttribute ) | ||
setTransactionIdAttribute ( string $transactionIdAttribute ) |
Method | Description | |
---|---|---|
createAccount ( $attributes ) | ||
createDbTransaction ( ) | ||
createTransaction ( $attributes ) | ||
findAccountId ( $attributes ) | ||
findTransaction ( $id ) | ||
incrementAccountBalance ( $accountId, $amount ) |
public getTransactionIdAttribute ( ) : string | ||
return | string |
protected incrementAccountBalance ( $accountId, $amount ) |
public setAccountIdAttribute ( string $accountIdAttribute ) | ||
$accountIdAttribute | string |
public setTransactionIdAttribute ( string $transactionIdAttribute ) | ||
$transactionIdAttribute | string |
public $accountTable |
public $db |