Public Method Details |
Dta |
public void Dta( integer $type )
|
|
Constructor. The type of the DTA file must be set. One file can
only contain credits (DTA_CREDIT) OR debits (DTA_DEBIT).This is a definement of the DTA format.
|
Parameter |
|
integer |
$type |
|
|
Determines the type of the DTA file. Either DTA_CREDIT or DTA_DEBIT. Must be set. |
|
Returns |
void |
|
validString |
public boolean validString( string $string )
|
|
Checks if the given string contains only chars valid for fields in DTA files.
|
Parameter |
|
string |
$string |
|
|
String that is checked. |
|
Returns |
boolean |
|
makeValidString |
public string makeValidString( string $string )
|
|
Makes the given string valid for DTA files. German umlauts become uppercase,
all other chars not allowed are replaced with space
|
Parameter |
|
string |
$string |
|
|
String that should made valid. |
|
Returns |
string |
|
setAccountFileSender |
public boolean setAccountFileSender( array $account )
|
|
Set the sender of the DTA file. Must be set for valid DTA file.
The given account data is also used as default sender's account.Account data containsname Sender's name. Maximally 27 chars are allowed.bank_code Sender's bank code.account_number Sender's account number.additional_name If necessary, additional line for sender's name (maximally 27 chars).
|
Parameter |
|
array |
$account |
|
|
Account data fot file sender. |
|
Returns |
boolean |
|
addExchange |
public boolean addExchange( array $account_receiver, double $amount, array $purposes, [ array $account_sender ] )
|
|
Adds an exchange. First the account data for the receiver of the exchange is set.
In the case the DTA file contains credits, this is the payment receiver. In the othercase (the DTA file contains debits), this is the account, from which money is taken away.If the sender is not specified, values of the file sender are used by default.Account data for receiver and sender containname Name. Maximally 27 chars are allowed.bank_code Bank code.account_number Account number.additional_name If necessary, additional line for name (maximally 27 chars).
|
Parameter |
|
array |
$account_receiver |
|
|
Receiver's account data. |
|
|
double |
$amount |
|
|
Amount of money in this exchange. Currency: EURO |
|
|
array |
$purposes |
|
|
Array of up to 15 lines (maximally 27 chars each) for description of the exchange. |
|
|
array |
$account_sender |
= >>array()<< |
|
Sender's account data. |
|
Returns |
boolean |
|
getFileContent |
public string getFileContent( )
|
|
Returns the full content of the generated DTA file. All added exchanges are processed.
|
Returns |
string |
|
saveFile |
public boolean saveFile( string $filename )
|
|
Writes the DTA file.
|
Parameter |
|
string |
$filename |
|
|
Filename. |
|
Returns |
boolean |
|