Tutorial Extension  1.0.0
SellerDeck Extensions - Tutorial Extension
InvalidCurrencyException.php
1 <?php
2 
3 /**
4  * InvalidCurrencyException.php - Implementation file for Invalid Currency Exception class.
5  *
6  * @package SellerDeck Extensions
7  *
8  * @author Péter Erdődi
9  * @copyright © SellerDeck Ltd 2015. All rights reserved.
10  */
11 
12 namespace SDExtension\SDException;
13 
15  {
16 
17  /**
18  * @var string $m_sCurrency Currency
19  */
20  private $m_sCurrency = "";
21 
22  /**
23  * __construct - Object constructor
24  *
25  * @access public
26  * @param string $sCurrency Currency
27  * @return void
28  */
29  public function __construct($sCurrency)
30  {
31  $this->m_sCurrency = $sCurrency;
32  parent::__construct(sprintf(EXCEPTION_MSG_INVALID_CURRENCY, $sCurrency), EXCEPTION_CODE_INVALID_CURRENCY);
33  }
34 
35  /**
36  * GetInvalidCurrency - Getting Invalid Currency
37  *
38  * @access public
39  * @return string Currency
40  */
41  public function GetInvalidCurrency()
42  {
43  return $this->m_sCurrency;
44  }
45 
46  }