1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of gpupo/cnova-sdk |
5
|
|
|
* Created by Gilmar Pupo <[email protected]> |
6
|
|
|
* For the information of copyright and license you should read the file |
7
|
|
|
* LICENSE which is distributed with this source code. |
8
|
|
|
* Para a informação dos direitos autorais e de licença você deve ler o arquivo |
9
|
|
|
* LICENSE que é distribuído com este código-fonte. |
10
|
|
|
* Para obtener la información de los derechos de autor y la licencia debe leer |
11
|
|
|
* el archivo LICENSE que se distribuye con el código fuente. |
12
|
|
|
* For more information, see <https://opensource.gpupo.com/>. |
13
|
|
|
*/ |
14
|
|
|
|
15
|
|
|
namespace Gpupo\CnovaSdk; |
16
|
|
|
|
17
|
|
|
use Gpupo\CnovaSdk\Client\Client; |
18
|
|
|
use Gpupo\CommonSdk\FactoryAbstract; |
19
|
|
|
|
20
|
|
|
class Factory extends FactoryAbstract |
21
|
|
|
{ |
22
|
|
|
public function setClient(array $clientOptions = []) |
23
|
|
|
{ |
24
|
|
|
$this->client = new Client($clientOptions, $this->logger); |
25
|
|
|
} |
26
|
|
|
|
27
|
38 |
|
public function getNamespace() |
28
|
|
|
{ |
29
|
38 |
|
return '\Gpupo\CnovaSdk\Entity\\'; |
30
|
|
|
} |
31
|
|
|
|
32
|
38 |
|
protected function getSchema($namespace = null) |
33
|
|
|
{ |
34
|
|
|
return [ |
35
|
|
|
'product' => [ |
36
|
38 |
|
'class' => $namespace.'Product\Product', |
37
|
38 |
|
'manager' => $namespace.'Product\Manager', |
38
|
|
|
], |
39
|
|
|
'order' => [ |
40
|
38 |
|
'class' => $namespace.'Order\Order', |
41
|
38 |
|
'manager' => $namespace.'Order\Manager', |
42
|
|
|
], |
43
|
|
|
'loads' => [ |
44
|
38 |
|
'class' => $namespace.'Product\Loads\Loads', |
45
|
38 |
|
'manager' => $namespace.'Product\Loads\Manager', |
46
|
|
|
], |
47
|
|
|
]; |
48
|
|
|
} |
49
|
|
|
} |
50
|
|
|
|