ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPaymentSettings Class Reference
+ Collaboration diagram for ilPaymentSettings:

Public Member Functions

 getAll ()
 get ($a_key)
 getValuesByScope ($a_scope)
 set ($a_key, $a_val, $a_scope=null)
 <type> $ilDB
 delete ($a_key)
 clearAll ()
 setAll ($a_array)

Static Public Member Functions

static _getInstance ()
static _isPaymentEnabled ()
static setMailUsePlaceholders ($a_mail_use_placeholders)
static getMailUsePlaceholders ()
static setMailBillingText ($a_mail_billing_text)
static getMailBillingText ()
static useShopSpecials ()

Data Fields

 $db
 $setting = array()

Private Member Functions

 __construct ()
 __getSettings ()

Static Private Attributes

static $_instance

Detailed Description

Definition at line 4 of file class.ilPaymentSettings.php.

Constructor & Destructor Documentation

ilPaymentSettings::__construct ( )
private

Definition at line 21 of file class.ilPaymentSettings.php.

References __getSettings().

{
global $ilDB;
$this->db = $ilDB;
$this->__getSettings();
}

+ Here is the call graph for this function:

Member Function Documentation

ilPaymentSettings::__getSettings ( )
private

Definition at line 29 of file class.ilPaymentSettings.php.

References $res, and $row.

Referenced by __construct().

{
$res = $this->db->query('SELECT * FROM payment_settings');
$this->setting = array();
while($row = $this->db->fetchAssoc($res))
{
$this->setting[$row["keyword"]] = $row["value"];
}
}

+ Here is the caller graph for this function:

static ilPaymentSettings::_getInstance ( )
static

Definition at line 11 of file class.ilPaymentSettings.php.

References $_instance.

Referenced by ilPurchasePaypal\__checkItems(), ilShopBaseGUI\__construct(), ilShopGUI\__construct(), ilPaypalSettings\__construct(), ilPaymentBookings\__construct(), ilEPaySettings\__construct(), ilObjPaymentSettingsGUI\__construct(), ilUserDefinedInvoiceNumber\__construct(), ilShopSearchResult\__initSearchSettingsObject(), ilPurchaseBaseGUI\__sendBill(), ilPurchaseBaseGUI\__showItemsTable(), ilPurchaseBaseGUI\__showShoppingCart(), ilPaymentPrices\_formatPriceToString(), ilUserDefinedInvoiceNumber\_getIncCurrentValue(), ilPaymentPrices\_getPriceStringFromAmount(), ilUserDefinedInvoiceNumber\_getResetPeriod(), _isPaymentEnabled(), ilUserDefinedInvoiceNumber\_isUDInvoiceNumberActive(), ilUserDefinedInvoiceNumber\_nextIncCurrentValue(), ilUserDefinedInvoiceNumber\_setIncCurrentValue(), ilPaymentStatisticGUI\addCustomer(), ilObjPaymentSettingsGUI\addCustomerObject(), ilShopController\buildTabs(), ilShopBoughtObjectsGUI\createBill(), ilObjPaymentSettingsGUI\editPriceObject(), ilShopController\executeCommand(), getMailBillingText(), getMailUsePlaceholders(), ilBMFSettings\ilBMFSettings(), ilObjPaymentSettingsGUI\saveCustomerObject(), ilShopShoppingCartGUI\showCouponInput(), ilShopShoppingCartGUI\showItems(), ilShopShoppingCartGUI\showItemsTable(), and useShopSpecials().

{
if(!isset(self::$_instance))
{
self::$_instance = new ilPaymentSettings();
}
}

+ Here is the caller graph for this function:

static ilPaymentSettings::_isPaymentEnabled ( )
static

Definition at line 114 of file class.ilPaymentSettings.php.

References _getInstance().

Referenced by ilInitialisation\initSettings().

{
if(!isset(self::$_instance))
{
}
return self::$_instance->setting['shop_enabled'];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPaymentSettings::clearAll ( )

Definition at line 165 of file class.ilPaymentSettings.php.

{
// NO !
}
ilPaymentSettings::delete (   $a_key)

Definition at line 104 of file class.ilPaymentSettings.php.

Referenced by set().

{
global $ilDB;
$ilDB->manipulateF('
DELETE FROM payment_settings
WHERE keyword = %s',
array('text'), array($a_key));
}

+ Here is the caller graph for this function:

ilPaymentSettings::get (   $a_key)

Definition at line 45 of file class.ilPaymentSettings.php.

{
return $this->setting[$a_key];
}
ilPaymentSettings::getAll ( )

Definition at line 40 of file class.ilPaymentSettings.php.

References $setting.

{
}
static ilPaymentSettings::getMailBillingText ( )
static

Definition at line 143 of file class.ilPaymentSettings.php.

References _getInstance().

Referenced by ilObjPaymentSettingsGUI\BillingMailObject().

{
if(!isset(self::$_instance))
{
}
return self::$_instance->setting['mail_billing_text'];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilPaymentSettings::getMailUsePlaceholders ( )
static

Definition at line 128 of file class.ilPaymentSettings.php.

References _getInstance().

Referenced by ilObjPaymentSettingsGUI\BillingMailObject().

{
if(!isset(self::$_instance))
{
}
return self::$_instance->setting['mail_use_placeholders'];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPaymentSettings::getValuesByScope (   $a_scope)

Definition at line 50 of file class.ilPaymentSettings.php.

References $res, and $row.

{
global $ilDB;
$res = $ilDB->queryF('
SELECT * FROM payment_settings
WHERE scope = %s',
array('text'), array($a_scope));
$settings = array();
while($row = $this->db->fetchAssoc($res))
{
$settings[$row["keyword"]] = $row["value"];
}
return $settings;
}
ilPaymentSettings::set (   $a_key,
  $a_val,
  $a_scope = null 
)

<type> $ilDB

Parameters
<text>$a_scope // define a payment-scope for settings (i.e. invoice, gui, common ... )
<text>$a_key
<text>$a_val
Returns
<type>

Definition at line 75 of file class.ilPaymentSettings.php.

References $res, $row, and delete().

Referenced by setMailBillingText(), and setMailUsePlaceholders().

{
global $ilDB;
if($a_scope == null)
{
// check if scope is already set
$res = $ilDB->queryF('
SELECT scope FROM payment_settings
WHERE keyword = %s',
array('text'), array($a_key));
$row = $ilDB->fetchAssoc($res);
$a_scope = $row['scope'];
}
self::delete($a_key);
$ilDB->insert("payment_settings", array(
"keyword" => array("text", $a_key),
"value" => array("clob", $a_val),
"scope" => array("text", $a_scope)));
self::$_instance->setting[$a_key] = $a_val;
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPaymentSettings::setAll (   $a_array)

Definition at line 169 of file class.ilPaymentSettings.php.

{
// NO !
}
static ilPaymentSettings::setMailBillingText (   $a_mail_billing_text)
static

Definition at line 138 of file class.ilPaymentSettings.php.

References set().

Referenced by ilObjPaymentSettingsGUI\saveBillingMailObject().

{
self::set('mail_billing_text',$a_mail_billing_text);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilPaymentSettings::setMailUsePlaceholders (   $a_mail_use_placeholders)
static

Definition at line 123 of file class.ilPaymentSettings.php.

References set().

Referenced by ilObjPaymentSettingsGUI\saveBillingMailObject().

{
self::set('mail_use_placeholders',$a_mail_use_placeholders);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilPaymentSettings::useShopSpecials ( )
static

Definition at line 154 of file class.ilPaymentSettings.php.

References _getInstance().

Referenced by ilShopGUI\executeCommand().

{
if(!isset(self::$_instance))
{
}
return self::$_instance->setting['use_shop_specials'];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilPaymentSettings::$_instance
staticprivate

Definition at line 6 of file class.ilPaymentSettings.php.

Referenced by _getInstance().

ilPaymentSettings::$db

Definition at line 8 of file class.ilPaymentSettings.php.

ilPaymentSettings::$setting = array()

Definition at line 9 of file class.ilPaymentSettings.php.

Referenced by getAll().


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