PluginProbe
Responsive Menu – Create Mobile-Friendly Menu / 3.0.6
Responsive Menu – Create Mobile-Friendly Menu v3.0.6
4.7.3 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.10 4.1.11 4.1.12 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 All 90 releases
responsive-menu / src / config / route_dependencies.php

route_dependencies.php in Responsive Menu – Create Mobile-Friendly Menu 3.0.6, at src/config/route_dependencies.php

85 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 $container = new ResponsiveMenu\Routing\Container();
4
5 $container['option_helpers'] = function($c) {
6 include dirname(__FILE__) . '/option_helpers.php';
7 return $option_helpers;
8 };
9
10 $container['default_options'] = function($c) {
11 include dirname(__FILE__) . '/default_options.php';
12 return $default_options;
13 };
14
15 $container['database'] = function($c) {
16 return new ResponsiveMenu\Database\WpDatabase;
17 };
18
19 $container['option_factory'] = function($c) {
20 return new ResponsiveMenu\Factories\OptionFactory(
21 $c['default_options'],
22 $c['option_helpers']
23 );
24 };
25
26 $container['option_repository'] = function($c) {
27 return new ResponsiveMenu\Repositories\OptionRepository(
28 $c['database'],
29 $c['option_factory']
30 );
31 };
32
33 $container['option_service'] = function($c) {
34 return new ResponsiveMenu\Services\OptionService(
35 $c['option_repository'],
36 $c['option_factory']
37 );
38 };
39
40 $container['current_version'] = function($c) {
41 $plugin_data = get_plugin_data(dirname(dirname(dirname(__FILE__))) . '/responsive-menu.php', false, false);
42 return $plugin_data['Version'];
43 };
44
45 $container['old_version'] = function($c) {
46 return get_option('RMVer');
47 };
48
49 $container['old_options'] = function($c) {
50 return get_option('RMOptions');
51 };
52
53 $container['migration'] = function($c) {
54 return new ResponsiveMenu\Database\Migration(
55 $c['database'],
56 $c['option_service'],
57 $c['default_options'],
58 $c['current_version'],
59 $c['old_version'],
60 $c['old_options']
61 );
62 };
63
64 $container['admin_view'] = function($c) {
65 return new ResponsiveMenu\View\AdminView;
66 };
67
68 $container['front_view'] = function($c) {
69 return new ResponsiveMenu\View\FrontView;
70 };
71
72 $container['admin_controller'] = function($c) {
73 return new ResponsiveMenu\Controllers\Admin(
74 $c['option_service'],
75 $c['admin_view']
76 );
77 };
78
79 $container['front_controller'] = function($c) {
80 return new ResponsiveMenu\Controllers\Front(
81 $c['option_service'],
82 $c['front_view']
83 );
84 };
85