1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of Smsa WebService package. |
5
|
|
|
* (c) Hamoud Alhoqbani <[email protected]> |
6
|
|
|
* For the full copyright and license information, please view the LICENSE |
7
|
|
|
* file that was distributed with this source code. |
8
|
|
|
*/ |
9
|
|
|
|
10
|
|
|
namespace Alhoqbani\SmsaWebService\Soap\Type; |
11
|
|
|
|
12
|
|
|
use \WsdlToPhp\PackageBase\AbstractStructBase; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* This class stands for getPDFSino Type |
16
|
|
|
* |
17
|
|
|
* @date 2018/04/06 |
18
|
|
|
* @codeVersion 0.0.1 |
19
|
|
|
*/ |
20
|
|
View Code Duplication |
class GetPDFSino extends AbstractStructBase |
|
|
|
|
21
|
|
|
{ |
22
|
|
|
/** |
23
|
|
|
* The awbNo |
24
|
|
|
* Meta informations extracted from the WSDL |
25
|
|
|
* - maxOccurs: 1 |
26
|
|
|
* - minOccurs: 0 |
27
|
|
|
* |
28
|
|
|
* @var string |
29
|
|
|
*/ |
30
|
|
|
public $awbNo; |
31
|
|
|
/** |
32
|
|
|
* The passKey |
33
|
|
|
* Meta informations extracted from the WSDL |
34
|
|
|
* - maxOccurs: 1 |
35
|
|
|
* - minOccurs: 0 |
36
|
|
|
* |
37
|
|
|
* @var string |
38
|
|
|
*/ |
39
|
|
|
public $passKey; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Constructor method for getPDFSino |
43
|
|
|
* |
44
|
|
|
* @uses GetPDFSino::setAwbNo() |
45
|
|
|
* @uses GetPDFSino::setPassKey() |
46
|
|
|
* |
47
|
|
|
* @param string $awbNo |
48
|
|
|
* @param string $passKey |
49
|
|
|
*/ |
50
|
|
|
public function __construct($awbNo = null, $passKey = null) |
51
|
|
|
{ |
52
|
|
|
$this |
53
|
|
|
->setAwbNo($awbNo) |
54
|
|
|
->setPassKey($passKey); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Get awbNo value |
59
|
|
|
* |
60
|
|
|
* @return string|null |
61
|
|
|
*/ |
62
|
|
|
public function getAwbNo() |
63
|
|
|
{ |
64
|
|
|
return $this->awbNo; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* Set awbNo value |
69
|
|
|
* |
70
|
|
|
* @param string $awbNo |
71
|
|
|
* |
72
|
|
|
* @return \Alhoqbani\SmsaWebService\Soap\Type\GetPDFSino |
73
|
|
|
*/ |
74
|
|
|
public function setAwbNo($awbNo = null) |
75
|
|
|
{ |
76
|
|
|
// validation for constraint: string |
77
|
|
|
if (!is_null($awbNo) && !is_string($awbNo)) { |
78
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($awbNo)), __LINE__); |
79
|
|
|
} |
80
|
|
|
$this->awbNo = $awbNo; |
81
|
|
|
|
82
|
|
|
return $this; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* Get passKey value |
87
|
|
|
* |
88
|
|
|
* @return string|null |
89
|
|
|
*/ |
90
|
|
|
public function getPassKey() |
91
|
|
|
{ |
92
|
|
|
return $this->passKey; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* Set passKey value |
97
|
|
|
* |
98
|
|
|
* @param string $passKey |
99
|
|
|
* |
100
|
|
|
* @return \Alhoqbani\SmsaWebService\Soap\Type\GetPDFSino |
101
|
|
|
*/ |
102
|
|
|
public function setPassKey($passKey = null) |
103
|
|
|
{ |
104
|
|
|
// validation for constraint: string |
105
|
|
|
if (!is_null($passKey) && !is_string($passKey)) { |
106
|
|
|
throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($passKey)), __LINE__); |
107
|
|
|
} |
108
|
|
|
$this->passKey = $passKey; |
109
|
|
|
|
110
|
|
|
return $this; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* Method called when an object has been exported with var_export() functions |
115
|
|
|
* It allows to return an object instantiated with the values |
116
|
|
|
* |
117
|
|
|
* @see AbstractStructBase::__set_state() |
118
|
|
|
* |
119
|
|
|
* @uses AbstractStructBase::__set_state() |
120
|
|
|
* |
121
|
|
|
* @param array $array the exported values |
122
|
|
|
* |
123
|
|
|
* @return \Alhoqbani\SmsaWebService\Soap\Type\GetPDFSino |
124
|
|
|
*/ |
125
|
|
|
public static function __set_state(array $array) |
126
|
|
|
{ |
127
|
|
|
return parent::__set_state($array); |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* Method returning the class name |
132
|
|
|
* |
133
|
|
|
* @return string __CLASS__ |
134
|
|
|
*/ |
135
|
|
|
public function __toString() |
136
|
|
|
{ |
137
|
|
|
return __CLASS__; |
138
|
|
|
} |
139
|
|
|
} |
140
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.