ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilPaymentPrices Class Reference
+ Collaboration diagram for ilPaymentPrices:

Public Member Functions

 __construct ($a_pobject_id=0)
 
 setPriceType ($a_price_type)
 
 getPriceType ()
 
 getPobjectId ()
 
 getPrices ()
 
 getPrice ($a_price_id)
 
 setPrice ($a_price=0)
 
 setCurrency ($a_currency_id)
 
 setDuration ($a_duration)
 
 setUnlimitedDuration ($a_unlimited_duration)
 
 setExtension ($a_extension)
 
 getExtension ()
 
 add ()
 
 update ($a_price_id)
 
 delete ($a_price_id)
 
 deleteAllPrices ()
 
 validate ()
 Validates a price before database manipulations. More...
 
 getExtensionPrices ()
 
 getNumberOfPrices ()
 
 getLowestPrice ()
 
 setDurationFrom ($a_duration_from)
 
 setDurationUntil ($a_duration_until)
 
 setDescription ($a_description)
 

Static Public Member Functions

static _getPrice ($a_price_id)
 
static _countPrices ($a_pobject_id)
 
static _getPriceString ($a_price_id)
 
static _getGUIPrice ($a_price)
 
static _formatPriceToString ($a_price)
 
static _getPriceStringFromAmount ($a_price)
 
static _getTotalAmount ($a_price_ids)
 
static _priceExists ($a_price_id, $a_pobject_id)
 

Data Fields

const TYPE_DURATION_MONTH = 1
 
const TYPE_DURATION_DATE = 2
 
const TYPE_UNLIMITED_DURATION = 3
 
 $price_type = self::TYPE_DURATION_MONTH
 

Private Member Functions

 __getPrice ()
 
 __getCurrency ()
 
 __getDuration ()
 
 __getUnlimitedDuration ()
 
 __read ($with_extension_prices=false)
 
 __getDurationFrom ()
 
 __getDurationUntil ()
 
 __getDescription ()
 

Private Attributes

 $pobject_id
 
 $price
 
 $currency
 
 $duration = 0
 
 $unlimited_duration = 0
 
 $extension = 0
 
 $duration_from
 
 $duration_until
 
 $description
 
 $prices = array()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilPaymentPrices::__construct (   $a_pobject_id = 0)

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

References $ilDB, and __read().

34  {
35  global $ilDB;
36 
37  $this->db = $ilDB;
38 
39  $this->pobject_id = $a_pobject_id;
40 
41  $this->__read();
42  }
__read($with_extension_prices=false)
global $ilDB
+ Here is the call graph for this function:

Member Function Documentation

◆ __getCurrency()

ilPaymentPrices::__getCurrency ( )
private

Definition at line 374 of file class.ilPaymentPrices.php.

References $currency.

Referenced by add(), and update().

375  {
376  /*TODO: CURRENCY not finished yet -> return 1 as default */
377  if($this->currency == null)
378  $this->currency = 1;
379  return $this->currency;
380  }
+ Here is the caller graph for this function:

◆ __getDescription()

ilPaymentPrices::__getDescription ( )
private

Definition at line 510 of file class.ilPaymentPrices.php.

References $description.

Referenced by add(), and update().

511  {
512  return $this->description;
513  }
+ Here is the caller graph for this function:

◆ __getDuration()

ilPaymentPrices::__getDuration ( )
private

Definition at line 381 of file class.ilPaymentPrices.php.

References $duration.

Referenced by add(), update(), and validate().

382  {
383  return $this->duration;
384  }
+ Here is the caller graph for this function:

◆ __getDurationFrom()

ilPaymentPrices::__getDurationFrom ( )
private

Definition at line 501 of file class.ilPaymentPrices.php.

References $duration_from.

Referenced by add(), update(), and validate().

502  {
503  return $this->duration_from;
504  }
+ Here is the caller graph for this function:

◆ __getDurationUntil()

ilPaymentPrices::__getDurationUntil ( )
private

Definition at line 506 of file class.ilPaymentPrices.php.

References $duration_until.

Referenced by add(), update(), and validate().

507  {
508  return $this->duration_until;
509  }
+ Here is the caller graph for this function:

◆ __getPrice()

ilPaymentPrices::__getPrice ( )
private

Definition at line 370 of file class.ilPaymentPrices.php.

References $price.

Referenced by add(), update(), and validate().

371  {
372  return $this->price;
373  }
+ Here is the caller graph for this function:

◆ __getUnlimitedDuration()

ilPaymentPrices::__getUnlimitedDuration ( )
private

Definition at line 385 of file class.ilPaymentPrices.php.

References $unlimited_duration.

Referenced by add(), and update().

386  {
388  }
+ Here is the caller graph for this function:

◆ __read()

ilPaymentPrices::__read (   $with_extension_prices = false)
private

Definition at line 390 of file class.ilPaymentPrices.php.

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

Referenced by __construct(), add(), delete(), deleteAllPrices(), and update().

391  {
392  $this->prices = array();
393 
394  if(!$with_extension_prices)
395  {
396  $res = $this->db->queryf('
397  SELECT * FROM payment_prices
398  WHERE pobject_id = %s
399  AND extension = %s
400  ORDER BY duration',
401  array('integer','integer'),
402  array($this->getPobjectId(), 0));
403  }
404  else
405  {
406  // needed for administration view
407  $res = $this->db->queryf('
408  SELECT * FROM payment_prices
409  WHERE pobject_id = %s
410  ORDER BY duration',
411  array('integer'),
412  array($this->getPobjectId()));
413  }
414 
415  while($row = $this->db->fetchObject($res))
416  {
417  $this->prices[$row->price_id]['pobject_id'] = $row->pobject_id;
418  $this->prices[$row->price_id]['price_id'] = $row->price_id;
419  $this->prices[$row->price_id]['currency'] = $row->currency;
420  $this->prices[$row->price_id]['duration'] = $row->duration;
421  $this->prices[$row->price_id]['unlimited_duration'] = $row->unlimited_duration;
422  $this->prices[$row->price_id]['price'] = $row->price;
423  $this->prices[$row->price_id]['extension'] = $row->extension;
424  $this->prices[$row->price_id]['duration_from'] = $row->duration_from;
425  $this->prices[$row->price_id]['duration_until'] = $row->duration_until;
426  $this->prices[$row->price_id]['description'] = $row->description;
427  $this->prices[$row->price_id]['price_type'] = $row->price_type;
428  }
429  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _countPrices()

static ilPaymentPrices::_countPrices (   $a_pobject_id)
static

Definition at line 99 of file class.ilPaymentPrices.php.

References $ilDB, $res, and $row.

100  {
101  global $ilDB;
102 
103  $res = $ilDB->queryf('
104  SELECT count(price_id) FROM payment_prices
105  WHERE pobject_id = %s',
106  array('integer'),
107  array($a_pobject_id));
108 
109  $row = $ilDB->fetchAssoc($res);
110 
111  return ($row[0]);
112  }
global $ilDB

◆ _formatPriceToString()

static ilPaymentPrices::_formatPriceToString (   $a_price)
static

Definition at line 144 of file class.ilPaymentPrices.php.

References ilPaymentSettings\_getInstance().

Referenced by ilShopResultPresentationGUI\renderItems(), and ilShopPurchaseGUI\showDetails().

145  {
146  include_once './Services/Payment/classes/class.ilPaymentSettings.php';
147 
149  $currency_unit = $genSet->get('currency_unit');
150 
151  $gui_price = self::_getGUIPrice($a_price);
152 
153  return $gui_price . ' ' . $currency_unit;
154 
155  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getGUIPrice()

static ilPaymentPrices::_getGUIPrice (   $a_price)
static

Definition at line 122 of file class.ilPaymentPrices.php.

References $lng.

Referenced by ilShopShoppingCartGUI\showItems().

123  {
124  global $lng;
125 
126  $system_lng = $lng->getDefaultLanguage();
127 
128  // CODES: ISO 639
129  $use_comma_seperator = array('ar','bg','cs','de','da','es','et','it',
130  'fr','nl','el','sr','uk','ru','ro','tr','pl','lt','pt','sq','hu');
131 
132 // $use_point_separator = array('en','ja','zh','vi');
133 
134  if(in_array($system_lng, $use_comma_seperator))
135  {
136  $gui_price = number_format((float)$a_price, 2, ',', '');
137  }
138  else
139  $gui_price = number_format((float)$a_price, 2, '.', '');
140 
141  return $gui_price;
142  }
global $lng
Definition: privfeed.php:40
+ Here is the caller graph for this function:

◆ _getPrice()

static ilPaymentPrices::_getPrice (   $a_price_id)
static

Definition at line 74 of file class.ilPaymentPrices.php.

References $ilDB, $price, $res, and $row.

Referenced by ilPurchaseBaseGUI\__getShoppingCart(), ilPaymentObjectGUI\__initPaymentObject(), ilPurchaseBaseGUI\__showItemsTable(), ilPurchaseBaseGUI\__showShoppingCart(), _getPriceString(), _getTotalAmount(), ilShopShoppingCartGUI\addBookings(), ilObjPaymentSettingsGUI\editPriceObject(), ilPaymentShoppingCart\getShoppingCart(), ilObjPaymentSettingsGUI\saveCustomerObject(), ilShopShoppingCartGUI\showItems(), and ilShopShoppingCartGUI\showItemsTable().

75  {
76  global $ilDB;
77 
78  $res = $ilDB->queryf('
79  SELECT * FROM payment_prices
80  WHERE price_id = %s',
81  array('integer'), array($a_price_id));
82 
83  while($row = $ilDB->fetchObject($res))
84  {
85  $price['duration'] = $row->duration;
86  $price['duration_from'] = $row->duration_from;
87  $price['duration_until'] = $row->duration_until;
88  $price['description'] = $row->description;
89  $price['unlimited_duration'] = $row->unlimited_duration;
90  $price['currency'] = $row->currency;
91  $price['price'] = number_format($row->price, 2, '.', '');
92  $price['extension'] = $row->extension;
93  $price['price_type'] = $row->price_type;
94  }
95 
96  return count($price) ? $price : array();
97  }
global $ilDB
+ Here is the caller graph for this function:

◆ _getPriceString()

static ilPaymentPrices::_getPriceString (   $a_price_id)
static

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

References $price, and _getPrice().

Referenced by ilShopShoppingCartGUI\addBookings(), ilPaymentStatisticGUI\addCustomer(), ilObjPaymentSettingsGUI\addCustomerObject(), ilPaymentShoppingCart\getShoppingCart(), and ilShopShoppingCartGUI\showItems().

115  {
116  $price = ilPaymentPrices::_getPrice($a_price_id);
117  $gui_price = self::_getGUIPrice($price['price']);
118 
119  return $gui_price;
120  }
static _getPrice($a_price_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getPriceStringFromAmount()

static ilPaymentPrices::_getPriceStringFromAmount (   $a_price)
static

Definition at line 158 of file class.ilPaymentPrices.php.

References ilPaymentSettings\_getInstance().

159  {
160  include_once './Services/Payment/classes/class.ilPaymentCurrency.php';
161  include_once './Services/Payment/classes/class.ilPaymentSettings.php';
162 
164  $currency_unit = $genSet->get("currency_unit");
165 
166  $pr_str = '';
167  $pr_str .= number_format($a_price , 2, ",", ".");
168 
169  return $pr_str . " " . $currency_unit;
170  }
+ Here is the call graph for this function:

◆ _getTotalAmount()

static ilPaymentPrices::_getTotalAmount (   $a_price_ids)
static

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

References $price, and _getPrice().

Referenced by ilPaymentShoppingCart\__read().

174  {
175  include_once './Services/Payment/classes/class.ilPaymentPrices.php';
176 
177  $amount = array();
178 
179  if (is_array($a_price_ids))
180  {
181  for ($i = 0; $i < count($a_price_ids); $i++)
182  {
183  $price_data = ilPaymentPrices::_getPrice($a_price_ids[$i]["id"]);
184 
185  $price = (float) $price_data["price"];
186  $amount[$a_price_ids[$i]["pay_method"]] += (float) $price;
187  }
188  }
189  return $amount;
190  }
static _getPrice($a_price_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _priceExists()

static ilPaymentPrices::_priceExists (   $a_price_id,
  $a_pobject_id 
)
static

Definition at line 354 of file class.ilPaymentPrices.php.

References $ilDB, and $res.

Referenced by ilPaymentShoppingCart\__read().

355  {
356  global $ilDB;
357 
358  $res = $ilDB->queryf('
359  SELECT * FROM payment_prices
360  WHERE price_id = %s
361  AND pobject_id = %s',
362  array('integer', 'integer'),
363  array($a_price_id, $a_pobject_id));
364 
365  return $res->numRows() ? true : false;
366  }
global $ilDB
+ Here is the caller graph for this function:

◆ add()

ilPaymentPrices::add ( )

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

References $res, __getCurrency(), __getDescription(), __getDuration(), __getDurationFrom(), __getDurationUntil(), __getPrice(), __getUnlimitedDuration(), __read(), getExtension(), getPobjectId(), and getPriceType().

232  {
233  $next_id = $this->db->nextId('payment_prices');
234 
235  $res = $this->db->insert('payment_prices', array(
236  'price_id' => array('integer', $next_id),
237  'pobject_id' => array('integer', $this->getPobjectId()),
238  'currency' => array('integer', $this->__getCurrency()),
239  'duration' => array('integer', $this->__getDuration()),
240  'unlimited_duration'=> array('integer', $this->__getUnlimitedDuration()),
241  'price' => array('float', $this->__getPrice()),
242  'extension' => array('integer', $this->getExtension()),
243  'duration_from' => array('date', $this->__getDurationFrom()),
244  'duration_until' => array('date', $this->__getDurationUntil()),
245  'description' => array('text', $this->__getDescription()),
246  'price_type' => array('integer', $this->getPriceType())
247  ));
248 
249  $this->__read(true);
250  return true;
251  }
__read($with_extension_prices=false)
+ Here is the call graph for this function:

◆ delete()

ilPaymentPrices::delete (   $a_price_id)

Definition at line 272 of file class.ilPaymentPrices.php.

References __read().

273  {
274  $statement = $this->db->manipulateF('
275  DELETE FROM payment_prices
276  WHERE price_id = %s',
277  array('integer'), array($a_price_id));
278 
279  $this->__read(true);
280 
281  return true;
282  }
__read($with_extension_prices=false)
+ Here is the call graph for this function:

◆ deleteAllPrices()

ilPaymentPrices::deleteAllPrices ( )

Definition at line 283 of file class.ilPaymentPrices.php.

References __read(), and getPobjectId().

284  {
285  $statement = $this->db->manipulateF('
286  DELETE FROM payment_prices
287  WHERE pobject_id = %s',
288  array('integer'),
289  array($this->getPobjectId()));
290 
291  $this->__read(true);
292 
293  return true;
294  }
__read($with_extension_prices=false)
+ Here is the call graph for this function:

◆ getExtension()

ilPaymentPrices::getExtension ( )

Definition at line 225 of file class.ilPaymentPrices.php.

References $extension.

Referenced by add(), and update().

226  {
227  return $this->extension;
228  }
+ Here is the caller graph for this function:

◆ getExtensionPrices()

ilPaymentPrices::getExtensionPrices ( )

Definition at line 431 of file class.ilPaymentPrices.php.

References $prices, $res, $row, and getPobjectId().

432  {
433  $prices = array();
434 
435  $res = $this->db->queryf('
436  SELECT * FROM payment_prices
437  WHERE pobject_id = %s
438  AND extension = %s
439  ORDER BY duration',
440  array('integer','integer'),
441  array($this->getPobjectId(), 1));
442 
443  while($row = $this->db->fetchObject($res))
444  {
445  $prices[$row->price_id]['pobject_id'] = $row->pobject_id;
446  $prices[$row->price_id]['price_id'] = $row->price_id;
447  $prices[$row->price_id]['currency'] = $row->currency;
448  $prices[$row->price_id]['duration'] = $row->duration;
449  $prices[$row->price_id]['unlimited_duration'] = $row->unlimited_duration;
450  $prices[$row->price_id]['price'] = $row->price;
451  $prices[$row->price_id]['extension'] = $row->extension;
452  $prices[$row->price_id]['duration_from'] = $row->duration_from;
453  $prices[$row->price_id]['duration_until'] = $row->duration_until;
454  $prices[$row->price_id]['description'] = $row->description;
455  $prices[$row->price_id]['price_type'] = $row->price_type;
456  }
457  return $prices;
458  }
+ Here is the call graph for this function:

◆ getLowestPrice()

ilPaymentPrices::getLowestPrice ( )

Definition at line 465 of file class.ilPaymentPrices.php.

References $data.

Referenced by ilShopResultPresentationGUI\renderItems().

466  {
467  $lowest_price_id = 0;
468  $lowest_price = 0;
469 
470  foreach ($this->prices as $price_id => $data)
471  {
472  $current_price = $data['price'];
473 
474  if($lowest_price == 0||
475  $lowest_price > (float)$current_price)
476  {
477  $lowest_price = (float)$current_price;
478  $lowest_price_id = $price_id;
479  }
480  }
481 
482  return is_array($this->prices[$lowest_price_id]) ? $this->prices[$lowest_price_id] : array();
483  }
+ Here is the caller graph for this function:

◆ getNumberOfPrices()

ilPaymentPrices::getNumberOfPrices ( )

Definition at line 460 of file class.ilPaymentPrices.php.

461  {
462  return count($this->prices);
463  }

◆ getPobjectId()

ilPaymentPrices::getPobjectId ( )

Definition at line 58 of file class.ilPaymentPrices.php.

References $pobject_id.

Referenced by __read(), add(), deleteAllPrices(), getExtensionPrices(), and update().

59  {
60  return $this->pobject_id;
61  }
+ Here is the caller graph for this function:

◆ getPrice()

ilPaymentPrices::getPrice (   $a_price_id)

Definition at line 67 of file class.ilPaymentPrices.php.

68  {
69  return $this->prices[$a_price_id] ? $this->prices[$a_price_id] : array();
70  }

◆ getPrices()

ilPaymentPrices::getPrices ( )

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

64  {
65  return $this->prices ? $this->prices : array();
66  }

◆ getPriceType()

ilPaymentPrices::getPriceType ( )

Definition at line 51 of file class.ilPaymentPrices.php.

References $price_type.

Referenced by add(), update(), and validate().

52  {
53  return $this->price_type;
54  }
+ Here is the caller graph for this function:

◆ setCurrency()

ilPaymentPrices::setCurrency (   $a_currency_id)

Definition at line 199 of file class.ilPaymentPrices.php.

200  {
201  $this->currency = $a_currency_id;
202  }

◆ setDescription()

ilPaymentPrices::setDescription (   $a_description)

Definition at line 496 of file class.ilPaymentPrices.php.

497  {
498  $this->description = $a_description;
499  }

◆ setDuration()

ilPaymentPrices::setDuration (   $a_duration)

Definition at line 203 of file class.ilPaymentPrices.php.

204  {
205  if($this->unlimited_duration == '1' && ($a_duration == '' || null))
206  $a_duration = 0;
207 
208  $this->duration = (int)$a_duration;
209  }

◆ setDurationFrom()

ilPaymentPrices::setDurationFrom (   $a_duration_from)

Definition at line 485 of file class.ilPaymentPrices.php.

486  {
487  // $a_duration_from = "dd.mm.YYYY HH:ii:ss"
488  $this->duration_from = $a_duration_from;
489  }

◆ setDurationUntil()

ilPaymentPrices::setDurationUntil (   $a_duration_until)

Definition at line 491 of file class.ilPaymentPrices.php.

492  {
493  $this->duration_until = $a_duration_until;
494  }

◆ setExtension()

ilPaymentPrices::setExtension (   $a_extension)

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

221  {
222  $this->extension = (int)$a_extension;
223  }

◆ setPrice()

ilPaymentPrices::setPrice (   $a_price = 0)

Definition at line 193 of file class.ilPaymentPrices.php.

194  {
195  $this->price = preg_replace('/,/','.',$a_price);
196  $this->price = (float)$a_price;
197  }

◆ setPriceType()

ilPaymentPrices::setPriceType (   $a_price_type)

Definition at line 44 of file class.ilPaymentPrices.php.

45  {
46  $this->price_type = $a_price_type;
47 
48  return $this;
49  }

◆ setUnlimitedDuration()

ilPaymentPrices::setUnlimitedDuration (   $a_unlimited_duration)

Definition at line 211 of file class.ilPaymentPrices.php.

212  {
213  if($a_unlimited_duration)
214  $this->unlimited_duration = (int)$a_unlimited_duration;
215  else
216  $this->unlimited_duration = 0;
217  }

◆ update()

ilPaymentPrices::update (   $a_price_id)

Definition at line 252 of file class.ilPaymentPrices.php.

References __getCurrency(), __getDescription(), __getDuration(), __getDurationFrom(), __getDurationUntil(), __getPrice(), __getUnlimitedDuration(), __read(), getExtension(), getPobjectId(), and getPriceType().

253  {
254  $this->db->update('payment_prices',
255  array( 'pobject_id' => array('integer', $this->getPobjectId()),
256  'currency' => array('integer', $this->__getCurrency()),
257  'duration' => array('integer', $this->__getDuration()),
258  'unlimited_duration'=> array('integer', $this->__getUnlimitedDuration()),
259  'price' => array('float', $this->__getPrice()),
260  'extension' => array('integer', $this->getExtension()),
261  'duration_from' => array('date', $this->__getDurationFrom()),
262  'duration_until' => array('date', $this->__getDurationUntil()),
263  'description' => array('text', $this->__getDescription()),
264  'price_type' => array('integer', $this->getPriceType())
265  ),
266  array('price_id'=> array('integer', $a_price_id)));
267 
268  $this->__read(true);
269 
270  return true;
271  }
__read($with_extension_prices=false)
+ Here is the call graph for this function:

◆ validate()

ilPaymentPrices::validate ( )

Validates a price before database manipulations.

public

Exceptions
ilShopException

Definition at line 302 of file class.ilPaymentPrices.php.

References $lng, __getDuration(), __getDurationFrom(), __getDurationUntil(), __getPrice(), and getPriceType().

303  {
304  global $lng;
305 
306  include_once 'Services/Payment/exceptions/class.ilShopException.php';
307 
308  switch($this->getPriceType())
309  {
310  case self::TYPE_DURATION_MONTH:
311  if(!preg_match('/^[1-9][0-9]{0,1}$/', $this->__getDuration()))
312  throw new ilShopException($lng->txt('paya_price_not_valid'));
313  break;
314 
315  case self::TYPE_DURATION_DATE:
316  if(!preg_match('/^[0-9]{4,4}-[0-9]{1,2}-[0-9]{1,2}$/', $this->__getDurationFrom()))
317  throw new ilShopException($lng->txt('payment_price_invalid_date_from'));
318 
319  $from_date = explode('-', $this->__getDurationFrom());
320  if(!checkdate($from_date[1], $from_date[2], $from_date[0]))
321  throw new ilShopException($lng->txt('payment_price_invalid_date_from'));
322 
323  if(!preg_match('/^[0-9]{4,4}-[0-9]{1,2}-[0-9]{1,2}$/', $this->__getDurationUntil()))
324  throw new ilShopException($lng->txt('payment_price_invalid_date_until'));
325 
326  $till_date = explode('-', $this->__getDurationUntil());
327  if(!checkdate($till_date[1], $till_date[2], $till_date[0]))
328  throw new ilShopException($lng->txt('payment_price_invalid_date_until'));
329 
330  $from = mktime(12, 12, 12, $from_date[1], $from_date[2], $from_date[0]);
331  $till = mktime(12, 12, 12, $till_date[1], $till_date[2], $till_date[0]);
332 
333  if($from >= $till)
334  throw new ilShopException($lng->txt('payment_price_invalid_date_from_gt_until'));
335  break;
336 
337  case self::TYPE_UNLIMITED_DURATION:
338  return true;
339  break;
340 
341  default:
342  throw new ilShopException($lng->txt('payment_no_price_type_selected_sdf'));
343  break;
344  }
345 
346  if(preg_match('/[0-9]/',$this->__getPrice()))
347  {
348  return true;
349  }
350  throw new ilShopException($lng->txt('payment_price_invalid_price'));
351  }
global $lng
Definition: privfeed.php:40
Class for shop related exception handling in ILIAS.
+ Here is the call graph for this function:

Field Documentation

◆ $currency

ilPaymentPrices::$currency
private

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

Referenced by __getCurrency().

◆ $description

ilPaymentPrices::$description
private

Definition at line 28 of file class.ilPaymentPrices.php.

Referenced by __getDescription().

◆ $duration

ilPaymentPrices::$duration = 0
private

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

Referenced by __getDuration().

◆ $duration_from

ilPaymentPrices::$duration_from
private

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

Referenced by __getDurationFrom().

◆ $duration_until

ilPaymentPrices::$duration_until
private

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

Referenced by __getDurationUntil().

◆ $extension

ilPaymentPrices::$extension = 0
private

Definition at line 24 of file class.ilPaymentPrices.php.

Referenced by getExtension().

◆ $pobject_id

ilPaymentPrices::$pobject_id
private

Definition at line 18 of file class.ilPaymentPrices.php.

Referenced by getPobjectId().

◆ $price

ilPaymentPrices::$price
private

Definition at line 20 of file class.ilPaymentPrices.php.

Referenced by __getPrice(), _getPrice(), _getPriceString(), and _getTotalAmount().

◆ $price_type

ilPaymentPrices::$price_type = self::TYPE_DURATION_MONTH

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

Referenced by getPriceType().

◆ $prices

ilPaymentPrices::$prices = array()
private

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

Referenced by getExtensionPrices().

◆ $unlimited_duration

ilPaymentPrices::$unlimited_duration = 0
private

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

Referenced by __getUnlimitedDuration().

◆ TYPE_DURATION_DATE

◆ TYPE_DURATION_MONTH

◆ TYPE_UNLIMITED_DURATION


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