OXID eShop CE  4.8.11
 All Classes Files Functions Variables Pages
oxoutofstockexception.php
Go to the documentation of this file.
1 <?php
2 
7 {
13  private $_iRemainingAmount = 0;
14 
20  private $_sBasketIndex = null;
21 
29  public function setRemainingAmount( $iRemainingAmount )
30  {
31  $this->_iRemainingAmount = (int) $iRemainingAmount;
32  }
33 
39  public function getRemainingAmount()
40  {
42  }
43 
51  public function setBasketIndex( $sBasketIndex )
52  {
53  $this->_sBasketIndex = $sBasketIndex;
54  }
55 
61  public function getBasketIndex()
62  {
63  return $this->_sBasketIndex;
64  }
65 
72  public function getString()
73  {
74  return __CLASS__.'-'.parent::getString()." Remaining Amount --> ".$this->_iRemainingAmount;
75  }
76 
85  public function getValues()
86  {
87  $aRes = parent::getValues();
88  $aRes['remainingAmount'] = $this->getRemainingAmount();
89  $aRes['basketIndex'] = $this->getBasketIndex();
90  return $aRes;
91  }
92 
107  public function setDestination( $sDestination )
108  {
109  // in case destination not set, overriding default error message
110  if ( !$sDestination ) {
111  $this->message = oxRegistry::getLang()->translateString( $this->getMessage() ) . ": " . $this->getRemainingAmount();
112  } else {
113  $this->message = oxRegistry::getLang()->translateString( $this->getMessage() ) . ": ";
114  }
115  }
116 }