1 | <?php |
||
18 | class Frontend |
||
19 | { |
||
20 | static private $cache = true; |
||
21 | static private $objects = []; |
||
22 | |||
23 | |||
24 | /** |
||
25 | * Enables or disables caching of class instances |
||
26 | * |
||
27 | * @param boolean $value True to enable caching, false to disable it. |
||
28 | * @return boolean Previous cache setting |
||
29 | */ |
||
30 | static public function cache( $value ) |
||
35 | |||
36 | |||
37 | /** |
||
38 | * Creates the required controller specified by the given path of controller names |
||
39 | * |
||
40 | * Controllers are created by providing only the domain name, e.g. |
||
41 | * "basket" for the \Aimeos\Controller\Frontend\Basket\Standard or a path of names to |
||
42 | * retrieve a specific sub-controller if available. |
||
43 | * Please note, that only the default controllers can be created. If you need |
||
44 | * a specific implementation, you need to use the factory class of the |
||
45 | * controller to hand over specifc implementation names. |
||
46 | * |
||
47 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object required by managers |
||
48 | * @param string $path Name of the domain (and sub-managers) separated by slashes, e.g "basket" |
||
49 | * @return \Aimeos\Controller\Frontend\Iface New frontend controller |
||
50 | * @throws \Aimeos\Controller\Frontend\Exception If the given path is invalid or the manager wasn't found |
||
51 | */ |
||
52 | static public function create( \Aimeos\MShop\Context\Item\Iface $context, $path ) |
||
79 | } |
||
80 |