1 | <?php |
||
18 | class CoffeeMill |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * @var CoffeeShop $coffee_shop |
||
23 | */ |
||
24 | private static $coffee_shop; |
||
25 | |||
26 | |||
27 | |||
28 | /** |
||
29 | * @return mixed |
||
30 | */ |
||
31 | public static function getCoffeeShop() |
||
35 | |||
36 | |||
37 | |||
38 | /** |
||
39 | * @param CoffeeShop $coffee_shop |
||
40 | */ |
||
41 | public static function setCoffeeShop(CoffeeShop $coffee_shop) |
||
45 | |||
46 | |||
47 | |||
48 | /** |
||
49 | * @param string $identifier |
||
50 | * @param array $arguments |
||
51 | * @param string $type |
||
52 | * @return mixed |
||
53 | * @throws ServiceNotFoundException |
||
54 | */ |
||
55 | public static function createNew($identifier, $arguments = array(), $type = CoffeeMaker::BREW_NEW) |
||
59 | |||
60 | |||
61 | |||
62 | /** |
||
63 | * IMPORTANT!!! |
||
64 | * Usage of this method is discouraged as it promotes service location. |
||
65 | * It's current use is only as a stop gap measure until the CoffeeShop |
||
66 | * Dependency Injection Container can be implemented properly for all classes. |
||
67 | * If it is at all possible, inject your dependencies via your class constructor. |
||
68 | * This method WILL BE DEPRECATED at some point in the near future. |
||
69 | * |
||
70 | * @param string $identifier |
||
71 | * @param array $arguments |
||
72 | * @param string $type |
||
73 | * @return mixed |
||
74 | * @throws ServiceNotFoundException |
||
75 | */ |
||
76 | public static function getService($identifier, $arguments = array(), $type = CoffeeMaker::BREW_SHARED) |
||
80 | |||
81 | } |
||
82 | // End of file CoffeeMill.php |
||
83 | // Location: core/services/container/CoffeeMill.php |