ILIAS  release_4-4 Revision
ilPaypalSettings Class Reference
+ Collaboration diagram for ilPaypalSettings:

Public Member Functions

 setServerHost ($a_server_host)
 
 getServerHost ()
 
 setServerPath ($a_server_path)
 
 getServerPath ()
 
 setVendor ($a_vendor)
 
 getVendor ()
 
 setVendorPassword ($a_vendor_password)
 
 getVendorPassword ()
 
 setAuthToken ($a_auth_token)
 
 getAuthToken ()
 
 setPageStyle ($a_page_style)
 
 getPageStyle ()
 
 setSsl ($a_ssl)
 
 getSsl ()
 
 getAll ()
 Returns array of all paypal settings. More...
 
 clearAll ()
 Clears the payment settings for the paypal payment method. More...
 
 save ()
 Inserts or updates (if payment settings already exist) the paypal settings data. More...
 

Static Public Member Functions

static getInstance ()
 Static method to get the singleton instance. More...
 

Data Fields

 $pSettings
 

Private Member Functions

 __construct ()
 Constructor. More...
 
 getSettings ()
 Called from constructor to fetch settings from database. More...
 

Private Attributes

 $server_host
 
 $server_path
 
 $vendor
 
 $auth_token
 
 $page_style
 
 $ssl
 

Static Private Attributes

static $instance = null
 

Detailed Description

Author
Nadia Ahmad nahma.nosp@m.d@da.nosp@m.tabay.nosp@m..de
Jens Conze jc@da.nosp@m.taba.nosp@m.y.de
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
Id
class.ilPaypalSettings.php 22133 2009-10-16 08:09:11Z nkrzywon

Definition at line 15 of file class.ilPaypalSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilPaypalSettings::__construct ( )
private

Constructor.

private

Definition at line 52 of file class.ilPaypalSettings.php.

References ilPaymentSettings\_getInstance(), and getSettings().

53  {
54  $this->pSettings = ilPaymentSettings::_getInstance();
55  $this->getSettings();
56  }
getSettings()
Called from constructor to fetch settings from database.
+ Here is the call graph for this function:

Member Function Documentation

◆ clearAll()

ilPaypalSettings::clearAll ( )

Clears the payment settings for the paypal payment method.

public

Definition at line 220 of file class.ilPaypalSettings.php.

221  {
222  $this->pSettings->set('paypal', NULL, 'paypal');
223 // $this->settings = array();
224  }

◆ getAll()

ilPaypalSettings::getAll ( )

Returns array of all paypal settings.

public

Returns
array $values Array of all paypal settings

Definition at line 200 of file class.ilPaypalSettings.php.

References getAuthToken(), getPageStyle(), getServerHost(), getServerPath(), getSsl(), and getVendor().

201  {
202  $values = array(
203  "server_host" => $this->getServerHost(),
204  "server_path" => $this->getServerPath(),
205  "vendor" => $this->getVendor(),
206 // "vendor_password" => $this->getVendorPassword(),
207  "auth_token" => $this->getAuthToken(),
208  "page_style" => $this->getPageStyle(),
209  "ssl" => $this->getSsl()
210  );
211 
212  return $values;
213  }
+ Here is the call graph for this function:

◆ getAuthToken()

ilPaypalSettings::getAuthToken ( )
Returns
mixed

Definition at line 157 of file class.ilPaypalSettings.php.

References $auth_token.

Referenced by getAll(), and save().

158  {
159  return $this->auth_token;
160  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilPaypalSettings::getInstance ( )
static

Static method to get the singleton instance.

public

Returns
object $instance Singular ilPaypalSettings instance

Definition at line 37 of file class.ilPaypalSettings.php.

Referenced by ilPurchasePaypal\__construct(), ilShopShoppingCartGUI\__construct(), ilObjPaymentSettingsGUI\getSubTabs(), and ilObjPaymentSettingsGUI\savePaypalSettingsObject().

38  {
39  if (!self::$instance)
40  {
41  self::$instance = new ilPaypalSettings();
42  }
43 
44  return self::$instance;
45  }
+ Here is the caller graph for this function:

◆ getPageStyle()

ilPaypalSettings::getPageStyle ( )
Returns
mixed

Definition at line 173 of file class.ilPaypalSettings.php.

References $page_style.

Referenced by getAll(), and save().

174  {
175  return $this->page_style;
176  }
+ Here is the caller graph for this function:

◆ getServerHost()

ilPaypalSettings::getServerHost ( )
Returns
mixed

Definition at line 94 of file class.ilPaypalSettings.php.

References $server_host.

Referenced by getAll(), and save().

95  {
96  return $this->server_host;
97  }
+ Here is the caller graph for this function:

◆ getServerPath()

ilPaypalSettings::getServerPath ( )
Returns
mixed

Definition at line 110 of file class.ilPaypalSettings.php.

References $server_path.

Referenced by getAll(), and save().

111  {
112  return $this->server_path;
113  }
+ Here is the caller graph for this function:

◆ getSettings()

ilPaypalSettings::getSettings ( )
private

Called from constructor to fetch settings from database.

private

Definition at line 63 of file class.ilPaypalSettings.php.

References $data, setAuthToken(), setPageStyle(), setServerHost(), setServerPath(), setSsl(), and setVendor().

Referenced by __construct().

64  {
65  $paypal = null;
66  $paypal = $this->pSettings->get('paypal');
67  $data = array();
68 
69  if ($paypal != "" && $paypal != NULL )
70  {
71  $data = unserialize($paypal);
72  }
73 
74  $this->setServerHost($data["server_host"]);
75  $this->setServerPath($data["server_path"]);
76  $this->setVendor($data["vendor"]);
77 // $this->setVendorPassword($data['vendor_password']);
78  $this->setAuthToken($data["auth_token"]);
79  $this->setPageStyle($data["page_style"]);
80  $this->setSsl($data["ssl"]);
81  }
setServerPath($a_server_path)
setServerHost($a_server_host)
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSsl()

ilPaypalSettings::getSsl ( )
Returns
mixed

Definition at line 189 of file class.ilPaypalSettings.php.

References $ssl.

Referenced by getAll(), and save().

190  {
191  return $this->ssl;
192  }
+ Here is the caller graph for this function:

◆ getVendor()

ilPaypalSettings::getVendor ( )
Returns
mixed

Definition at line 126 of file class.ilPaypalSettings.php.

References $vendor.

Referenced by getAll(), and save().

127  {
128  return $this->vendor;
129  }
+ Here is the caller graph for this function:

◆ getVendorPassword()

ilPaypalSettings::getVendorPassword ( )
Returns
mixed

Definition at line 142 of file class.ilPaypalSettings.php.

143  {
144  return $this->vender_password;
145  }

◆ save()

ilPaypalSettings::save ( )

Inserts or updates (if payment settings already exist) the paypal settings data.

public

Definition at line 231 of file class.ilPaypalSettings.php.

References getAuthToken(), getPageStyle(), getServerHost(), getServerPath(), getSsl(), and getVendor().

232  {
233  $values = array(
234  "server_host" => $this->getServerHost(),
235  "server_path" => $this->getServerPath(),
236  "vendor" => $this->getVendor(),
237 // "vendor_password" => $this->getVendorPassword(),
238  "auth_token" => $this->getAuthToken(),
239  "page_style" => $this->getPageStyle(),
240  "ssl" => $this->getSsl()
241  );
242 
243  $this->pSettings->set('paypal', serialize($values), 'paypal');
244  }
+ Here is the call graph for this function:

◆ setAuthToken()

ilPaypalSettings::setAuthToken (   $a_auth_token)
Parameters
string$a_auth_token

Definition at line 149 of file class.ilPaypalSettings.php.

Referenced by getSettings().

150  {
151  $this->auth_token = $a_auth_token;
152  }
+ Here is the caller graph for this function:

◆ setPageStyle()

ilPaypalSettings::setPageStyle (   $a_page_style)
Parameters
string$a_page_style

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

Referenced by getSettings().

166  {
167  $this->page_style = $a_page_style;
168  }
+ Here is the caller graph for this function:

◆ setServerHost()

ilPaypalSettings::setServerHost (   $a_server_host)
Parameters
string$a_server_host

Definition at line 86 of file class.ilPaypalSettings.php.

Referenced by getSettings().

87  {
88  $this->server_host = $a_server_host;
89  }
+ Here is the caller graph for this function:

◆ setServerPath()

ilPaypalSettings::setServerPath (   $a_server_path)
Parameters
string$a_server_path

Definition at line 102 of file class.ilPaypalSettings.php.

Referenced by getSettings().

103  {
104  $this->server_path = $a_server_path;
105  }
+ Here is the caller graph for this function:

◆ setSsl()

ilPaypalSettings::setSsl (   $a_ssl)
Parameters
string$a_ssl

Definition at line 181 of file class.ilPaypalSettings.php.

Referenced by getSettings().

182  {
183  $this->ssl = $a_ssl;
184  }
+ Here is the caller graph for this function:

◆ setVendor()

ilPaypalSettings::setVendor (   $a_vendor)
Parameters
string$a_vendor

Definition at line 118 of file class.ilPaypalSettings.php.

Referenced by getSettings().

119  {
120  $this->vendor = $a_vendor;
121  }
+ Here is the caller graph for this function:

◆ setVendorPassword()

ilPaypalSettings::setVendorPassword (   $a_vendor_password)
Parameters
string$a_vendor_password

Definition at line 134 of file class.ilPaypalSettings.php.

135  {
136  $this->vender_password = $a_vendor_password;
137  }

Field Documentation

◆ $auth_token

ilPaypalSettings::$auth_token
private

Definition at line 25 of file class.ilPaypalSettings.php.

Referenced by getAuthToken().

◆ $instance

ilPaypalSettings::$instance = null
staticprivate

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

◆ $page_style

ilPaypalSettings::$page_style
private

Definition at line 26 of file class.ilPaypalSettings.php.

Referenced by getPageStyle().

◆ $pSettings

ilPaypalSettings::$pSettings

Definition at line 17 of file class.ilPaypalSettings.php.

◆ $server_host

ilPaypalSettings::$server_host
private

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

Referenced by getServerHost().

◆ $server_path

ilPaypalSettings::$server_path
private

Definition at line 22 of file class.ilPaypalSettings.php.

Referenced by getServerPath().

◆ $ssl

ilPaypalSettings::$ssl
private

Definition at line 27 of file class.ilPaypalSettings.php.

Referenced by getSsl().

◆ $vendor

ilPaypalSettings::$vendor
private

Definition at line 23 of file class.ilPaypalSettings.php.

Referenced by getVendor().


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