-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathWSAnswerFactory.php
40 lines (35 loc) · 1.15 KB
/
WSAnswerFactory.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
require_once 'WAnswerOfWebShopFizetes.php';
require_once 'WAnswerOfWebShopFizetesKetszereplos.php';
require_once 'WAnswerOfWebShopTranzAzonGeneralas.php';
require_once 'WAnswerOfWebShopTrazakcioLekerdezes.php';
require_once 'WAnswerOfWebShopJovairas.php';
require_once 'WAnswerOfWebShopKulcsLekerdezes.php';
/**
* A tranzakciós válasz XML-eket reprezentáló value object
* és azt elõállító WAnswerOf... osztályok összerendelése.
*
* @access private
*
* @version 4.0
*/
class WSAnswerFactory {
/**
* Adott tranzakciós válasz XML-t reprezentáló value object-et
* elõállító WAnswerOf... objektum elõállítása.
*
* @param string a tranzakció kódja
* @return mixed a megfelelõ WAnswerOf... objektum
*/
public static function getAnswerFactory($workflowName) {
switch ($workflowName) {
case 'WEBSHOPTRANZAZONGENERALAS':
return new WAnswerOfWebShopTranzAzonGeneralas();
case 'WEBSHOPTRANZAKCIOLEKERDEZES':
return new WAnswerOfWebShopTrazakcioLekerdezes();
case 'WEBSHOPFIZETES':
return new WAnswerOfWebShopFizetes();
}
return NULL;
}
}