|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the smsmode-bundle package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) 2019 WEBEWEB |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace WBW\Bundle\SMSModeBundle\Event; |
|
13
|
|
|
|
|
14
|
|
|
use WBW\Bundle\SMSModeBundle\Entity\TransferringCreditsInterface; |
|
15
|
|
|
use WBW\Library\SMSMode\Model\TransferringCreditsRequest; |
|
16
|
|
|
use WBW\Library\SMSMode\Model\TransferringCreditsResponse; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Transferring credits event |
|
20
|
|
|
* |
|
21
|
|
|
* @author webeweb <https://github.com/webeweb/> |
|
22
|
|
|
* @package WBW\Bundle\SMSModeBundle\Event |
|
23
|
|
|
*/ |
|
24
|
|
|
class TransferringCreditsEvent extends AbstractSMSModeEvent { |
|
25
|
|
|
|
|
26
|
|
|
/** |
|
27
|
|
|
* Constructor. |
|
28
|
|
|
* |
|
29
|
|
|
* @param TransferringCreditsInterface $transferringCredits The transferring credits. |
|
30
|
|
|
*/ |
|
31
|
|
|
public function __construct(TransferringCreditsInterface $transferringCredits) { |
|
32
|
|
|
parent::__construct(SMSModeEvents::TRANSFERRING_CREDITS, $transferringCredits); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* Get the transferring credits request. |
|
37
|
|
|
* |
|
38
|
|
|
* @return TransferringCreditsRequest Returns the transferring credits request. |
|
39
|
|
|
*/ |
|
40
|
|
|
public function getRequest() { |
|
41
|
|
|
return parent::getRequest(); |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* Get the transferring credits response. |
|
46
|
|
|
* |
|
47
|
|
|
* @return TransferringCreditsResponse Returns the transferring credits response. |
|
48
|
|
|
*/ |
|
49
|
|
|
public function getResponse() { |
|
50
|
|
|
return parent::getResponse(); |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* Get the transferring credits. |
|
55
|
|
|
* |
|
56
|
|
|
* @return TransferringCreditsInterface Returns the transferring credits. |
|
57
|
|
|
*/ |
|
58
|
|
|
public function getTransferringCredits() { |
|
59
|
|
|
return parent::getEntity(); |
|
|
|
|
|
|
60
|
|
|
} |
|
61
|
|
|
} |
|
62
|
|
|
|
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()method in theSoncalls the wrong method in the parent class.