1 | <?php |
||
8 | class Factory |
||
9 | { |
||
10 | const ORDER = 'order'; |
||
11 | const PARTNER = 'partner'; |
||
12 | const STOCK = 'stock'; |
||
13 | const CUSTOMER = 'customer'; |
||
14 | const CATALOG = 'catalog'; |
||
15 | |||
16 | private static $mappingInterfaces = array( |
||
17 | self::ORDER => 'Iris\Interfaces\Order', |
||
18 | self::PARTNER => 'Iris\Interfaces\IrisPartner', |
||
19 | self::STOCK => 'Iris\Interfaces\Stock', |
||
20 | self::CUSTOMER => 'Iris\Interfaces\Customer', |
||
21 | self::CATALOG => 'Iris\Interfaces\Catalog', |
||
22 | ); |
||
23 | |||
24 | /** |
||
25 | * @param string $type |
||
26 | * @param string $className |
||
27 | * @param \Iris\Manager $manager |
||
28 | * @return mixed |
||
29 | */ |
||
30 | 3 | public static function create($type, $className, Manager $manager) |
|
36 | |||
37 | /** |
||
38 | * @param string $type |
||
39 | * @param $object |
||
40 | * @throws InvalidArgumentException |
||
41 | */ |
||
42 | 3 | private static function checkInstanceOf($type, $object) |
|
55 | } |
||
56 |