@@ 81-101 (lines=21) @@ | ||
78 | /** |
|
79 | * @return array of Merchants |
|
80 | */ |
|
81 | public function getMerchants(): array |
|
82 | { |
|
83 | $arrResult = array(); |
|
84 | $merchantList = $this->_network->getMerchantList(); |
|
85 | foreach ($merchantList as $merchant) { |
|
86 | $Merchant = Merchant::createInstance(); |
|
87 | $Merchant->merchant_ID = $merchant['cid']; |
|
88 | $Merchant->name = $merchant['name']; |
|
89 | // Added more info - 2018-04-20 <PN> |
|
90 | $Merchant->url = $merchant['url']; |
|
91 | $Merchant->status = $merchant['status']; |
|
92 | if (!empty($merchant['launch_date'])) { |
|
93 | $date = new \DateTime($merchant['launch_date']); |
|
94 | //TODO check date format |
|
95 | //$Merchant->launch_date = $date; |
|
96 | } |
|
97 | $arrResult[] = $Merchant; |
|
98 | } |
|
99 | ||
100 | return $arrResult; |
|
101 | } |
|
102 | ||
103 | /** |
|
104 | * @param int $merchantID |
@@ 74-88 (lines=15) @@ | ||
71 | /** |
|
72 | * @return array of Merchants |
|
73 | */ |
|
74 | public function getMerchants() : array |
|
75 | { |
|
76 | $arrResult = array(); |
|
77 | $merchantList = $this->_network->getMerchantList(); |
|
78 | foreach($merchantList as $merchant) { |
|
79 | $Merchant = Merchant::createInstance(); |
|
80 | $Merchant->merchant_ID = $merchant['cid']; |
|
81 | $Merchant->name = $merchant['name']; |
|
82 | $Merchant->status = $merchant['status']; |
|
83 | $Merchant->termination_date = $merchant['termination_date']; |
|
84 | $Merchant->url = $merchant['url']; |
|
85 | $arrResult[] = $Merchant; |
|
86 | } |
|
87 | return $arrResult; |
|
88 | } |
|
89 | ||
90 | /** |
|
91 | * @param int $merchantID |
@@ 79-92 (lines=14) @@ | ||
76 | * @return array of Merchants |
|
77 | * @throws \Exception |
|
78 | */ |
|
79 | public function getMerchants(): array |
|
80 | { |
|
81 | $arrResult = array(); |
|
82 | $merchantList = $this->_network->getMerchantList(); |
|
83 | foreach ($merchantList as $merchant) { |
|
84 | $Merchant = Merchant::createInstance(); |
|
85 | $Merchant->merchant_ID = $merchant['cid']; |
|
86 | $Merchant->name = $merchant['name']; |
|
87 | $Merchant->status = $merchant['status']; |
|
88 | $Merchant->url = $merchant['url']; |
|
89 | $arrResult[] = $Merchant; |
|
90 | } |
|
91 | return $arrResult; |
|
92 | } |
|
93 | ||
94 | /** |
|
95 | * @param null $merchantID |
@@ 81-96 (lines=16) @@ | ||
78 | /** |
|
79 | * @return array of Merchants |
|
80 | */ |
|
81 | public function getMerchants() : array |
|
82 | { |
|
83 | $arrResult = array(); |
|
84 | $merchantList = $this->_network->getMerchantList(); |
|
85 | foreach($merchantList as $merchant) { |
|
86 | $Merchant = Merchant::createInstance(); |
|
87 | $Merchant->merchant_ID = $merchant['cid']; |
|
88 | $Merchant->name = $merchant['name']; |
|
89 | // Added more info - 2018-04-23 <PN> |
|
90 | $Merchant->status = $merchant['status']; |
|
91 | $Merchant->url = $merchant['url']; |
|
92 | $arrResult[] = $Merchant; |
|
93 | } |
|
94 | ||
95 | return $arrResult; |
|
96 | } |
|
97 | ||
98 | /** |
|
99 | * @param int $merchantID to filter only one merchant |