ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPaymentCurrency Class Reference
+ Collaboration diagram for ilPaymentCurrency:

Public Member Functions

 _getAvailableCurrencies ()
 _getCurrency ($a_currency_id)
 _getUnit ($a_currency_id)
 _getSubUnit ($a_currency_id)

Detailed Description

Definition at line 31 of file class.ilPaymentCurrency.php.

Member Function Documentation

ilPaymentCurrency::_getAvailableCurrencies ( )

Definition at line 33 of file class.ilPaymentCurrency.php.

References $res, and DB_FETCHMODE_OBJECT.

Referenced by ilPaymentObjectGUI\performAddPrice(), and ilObjPaymentSettingsGUI\performAddPriceObject().

{
global $ilDB;
$query = "SELECT * FROM payment_currencies ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$currencies[$row->currency_id]['currency_id'] = $row->currency_id;
$currencies[$row->currency_id]['unit'] = $row->unit;
$currencies[$row->currency_id]['subunit'] = $row->subunit;
}
return $currencies ? $currencies : array();
}

+ Here is the caller graph for this function:

ilPaymentCurrency::_getCurrency (   $a_currency_id)

Definition at line 48 of file class.ilPaymentCurrency.php.

References $res, and DB_FETCHMODE_OBJECT.

Referenced by ilPaymentObjectGUI\editPrices(), and ilObjPaymentSettingsGUI\editPricesObject().

{
global $ilDB;
$query = "SELECT * FROM payment_currencies ".
"WHERE currency_id = '".$a_currency_id."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$currencies['currency_id'] = $row->currency_id;
$currencies['unit'] = $row->unit;
$currencies['sub_unit'] = $row->subunit;
}
return $currencies;
}

+ Here is the caller graph for this function:

ilPaymentCurrency::_getSubUnit (   $a_currency_id)

Definition at line 78 of file class.ilPaymentCurrency.php.

References $res, and DB_FETCHMODE_OBJECT.

{
global $ilDB;
$query = "SELECT subunit FROM payment_currencies ".
"WHERE currency_id = '".$a_currency_id."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->subunit;
}
return false;
}
ilPaymentCurrency::_getUnit (   $a_currency_id)

Definition at line 64 of file class.ilPaymentCurrency.php.

References $res, and DB_FETCHMODE_OBJECT.

{
global $ilDB;
$query = "SELECT unit FROM payment_currencies ".
"WHERE currency_id = '".$a_currency_id."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
return $row->unit;
}
return false;
}

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