1 | <?php |
||
9 | class AccessPointSearch implements NodeInterface |
||
10 | { |
||
11 | /** |
||
12 | * Access Point Status Codes. |
||
13 | */ |
||
14 | const STATUS_ACTIVE_AVAILABLE = '01'; |
||
15 | const STATUS_ACTIVE_UNAVAILABLE = '07'; |
||
16 | |||
17 | /** |
||
18 | * @var |
||
19 | */ |
||
20 | private $publicAccessPointId; |
||
21 | |||
22 | /** |
||
23 | * @var |
||
24 | */ |
||
25 | private $accessPointStatus; |
||
26 | |||
27 | /** |
||
28 | * @var |
||
29 | */ |
||
30 | private $accountNumber; |
||
31 | |||
32 | /** |
||
33 | * @param null|DOMDocument $document |
||
34 | * |
||
35 | * @return DOMElement |
||
36 | */ |
||
37 | public function toNode(DOMDocument $document = null) |
||
38 | { |
||
39 | if (null === $document) { |
||
40 | $document = new DOMDocument(); |
||
41 | } |
||
42 | |||
43 | $node = $document->createElement('AccessPointSearch'); |
||
44 | |||
45 | if ($this->getAccessPointStatus()) { |
||
46 | $node->appendChild($document->createElement('AccessPointStatus', $this->getAccessPointStatus())); |
||
47 | } |
||
48 | |||
49 | if ($this->getPublicAccessPointId()) { |
||
50 | $node->appendChild($document->createElement('PublicAccessPointID', $this->getPublicAccessPointId())); |
||
51 | } |
||
52 | |||
53 | if ($this->getAccountNumber()) { |
||
54 | $node->appendChild($document->createElement('AccountNumber', $this->getAccountNumber())); |
||
55 | } |
||
56 | |||
57 | return $node; |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @return mixed |
||
62 | */ |
||
63 | public function getAccountNumber() |
||
64 | { |
||
65 | return $this->accountNumber; |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * @param mixed $accountNumber |
||
70 | */ |
||
71 | public function setAccountNumber($accountNumber) |
||
75 | |||
76 | /** |
||
77 | * @return mixed |
||
78 | */ |
||
79 | public function getPublicAccessPointId() |
||
80 | { |
||
81 | return $this->publicAccessPointId; |
||
82 | } |
||
83 | |||
84 | /** |
||
85 | * @param mixed $publicAccessPointId |
||
86 | */ |
||
87 | public function setPublicAccessPointId($publicAccessPointId) |
||
91 | |||
92 | /** |
||
93 | * @return mixed |
||
94 | */ |
||
95 | public function getAccessPointStatus() |
||
96 | { |
||
97 | return $this->accessPointStatus; |
||
98 | } |
||
99 | |||
100 | /** |
||
101 | * @param mixed $accessPointStatus |
||
102 | */ |
||
103 | public function setAccessPointStatus($accessPointStatus) |
||
107 | } |
||
108 |