1 | <?php |
||
19 | abstract class ServiceAbstract implements ServiceInterface |
||
20 | { |
||
21 | /** |
||
22 | * Remote directory configuration. |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | private $directoryConfig = array( |
||
27 | 'send' => 'To_LSP', |
||
28 | 'send_processed' => 'To_LSP_processed', |
||
29 | 'receive' => 'From_LSP', |
||
30 | 'receive_processed' => 'From_LSP_processed', |
||
31 | ); |
||
32 | |||
33 | /** |
||
34 | * Constructor. |
||
35 | * |
||
36 | * This will extract the remote directory configuration from the config |
||
37 | * array: |
||
38 | * - directory_send : The remote directory to store the request file in. |
||
39 | * - directory_send_processed : The remote directory where the processed |
||
40 | * request files are stored. |
||
41 | * - directory_receive : The remote directory where the translated files are |
||
42 | * stored to be picked up. |
||
43 | * - directory_receive_processed : The repome directory where to put the |
||
44 | * translation files that are successfully processed by the local system. |
||
45 | * |
||
46 | * @param array $config |
||
47 | * The remote directory config. |
||
48 | */ |
||
49 | 81 | public function __construct(array $config = array()) |
|
53 | |||
54 | /** |
||
55 | * Set the config based on the given config array. |
||
56 | * |
||
57 | * @param array $config |
||
58 | * The configuration array. |
||
59 | */ |
||
60 | 81 | protected function setDirectoryConfig(array $config) |
|
71 | |||
72 | /** |
||
73 | * Get the remote directory name to where to store the request files. |
||
74 | * |
||
75 | * @return string |
||
76 | * The remote directory to store the request file in. |
||
77 | */ |
||
78 | 24 | protected function getDirectorySend() |
|
82 | |||
83 | /** |
||
84 | * Get the remote directory where the translated response files are located. |
||
85 | * |
||
86 | * @return string |
||
87 | */ |
||
88 | 48 | protected function getDirectoryReceive() |
|
92 | |||
93 | /** |
||
94 | * Get the remote directory where a processed response should be moved to. |
||
95 | * |
||
96 | * @return string |
||
97 | */ |
||
98 | 18 | protected function getDirectoryReceiveProcessed() |
|
102 | } |
||
103 |