DHL-PHP-SDK
v0.4
A wrapper for the DHL-XML-API Version 2
Version.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Petschko\DHL
;
4
14
use
stdClass
;
15
21
abstract
class
Version
{
27
private
$version;
28
34
private
$mayor;
35
41
private
$minor;
42
48
protected
function
__construct
($version) {
49
$this->
setVersion
($version);
50
}
51
55
protected
function
__destruct
() {
56
unset($this->version);
57
unset($this->mayor);
58
unset($this->minor);
59
}
60
66
public
function
getVersion
() {
67
return
$this->version;
68
}
69
75
protected
function
setVersion
($version) {
76
$this->version = $version;
77
78
$numbers = explode(
'.'
, $version);
79
80
// Update Mayor and Minor-Version-Numbers
81
$this->setMayor((
int
) $numbers[0]);
82
$this->setMinor((
int
) $numbers[1]);
83
}
84
90
public
function
getMayor
() {
91
return
$this->mayor;
92
}
93
99
private
function
setMayor($mayor) {
100
$this->mayor = $mayor;
101
}
102
108
public
function
getMinor
() {
109
return
$this->minor;
110
}
111
117
private
function
setMinor($minor) {
118
$this->minor = $minor;
119
}
120
126
protected
function
getVersionClass
() {
127
$class =
new
StdClass;
128
129
$class->majorRelease = $this->
getMayor
();
130
$class->minorRelease = $this->
getMinor
();
131
132
return
$class;
133
}
134
}
Petschko\DHL\Version\getVersion
getVersion()
Definition:
Version.php:66
Petschko\DHL\Version\__destruct
__destruct()
Definition:
Version.php:55
stdClass
Petschko\DHL\Version\__construct
__construct($version)
Definition:
Version.php:48
Petschko\DHL\Version\setVersion
setVersion($version)
Definition:
Version.php:75
Petschko\DHL
Definition:
Address.php:3
Petschko\DHL\Version\getMayor
getMayor()
Definition:
Version.php:90
Petschko\DHL\Version\getMinor
getMinor()
Definition:
Version.php:108
Petschko\DHL\Version
Definition:
Version.php:21
Petschko\DHL\Version\getVersionClass
getVersionClass()
Definition:
Version.php:126
includes
Version.php
Generated by
1.8.12