PluginProbe
Boxzilla – WordPress Popup Builder / 3.2.4
Boxzilla – WordPress Popup Builder v3.2.4
3.4.11 3.4.10 3.4.9 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 trunk 3.0 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 All 72 releases
boxzilla / src / class-boxzilla-service-provider.php

class-boxzilla-service-provider.php in Boxzilla – WordPress Popup Builder 3.2.4, at src/class-boxzilla-service-provider.php

69 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Boxzilla;
4
5 use Boxzilla\Admin\Admin;
6 use Boxzilla\Admin\Notices;
7 use Boxzilla\DI\Container;
8 use Boxzilla\DI\ServiceProviderInterface;
9
10 class BoxzillaServiceProvider implements ServiceProviderInterface {
11
12 /**
13 * Registers services on the given container.
14 *
15 * This method should only be used to configure services and parameters.
16 * It should not get services.
17 *
18 * @param Container $container An Container instance
19 */
20 public function register( Container $container ) {
21
22 $container['admin'] = function( $container ) {
23 return new Admin( $container->plugin, $container );
24 };
25
26 $container['bootstrapper'] = new Bootstrapper();
27
28 $container['box_loader'] = function( $container ) {
29 return new BoxLoader( $container->plugin, $container->options );
30 };
31
32 $container['filter.autocomplete'] = function( $container ) {
33 return new Filter\Autocomplete();
34 };
35
36 $container['notices'] = function( $container ) {
37 return new Notices();
38 };
39
40 $container['options'] = function( $container ) {
41 $defaults = array(
42 'test_mode' => 0
43 );
44
45 $options = (array) get_option( 'boxzilla_settings', $defaults );
46 $options = array_merge( $defaults, $options );
47 return $options;
48 };
49
50 $container['plugin'] = new Plugin(
51 'boxzilla',
52 'Boxzilla',
53 BOXZILLA_VERSION,
54 BOXZILLA_FILE,
55 dirname( BOXZILLA_FILE )
56 );
57
58 $container['plugins'] = function( $container ) {
59 $plugins = (array) apply_filters( 'boxzilla_extensions', array() );
60 return new Collection( $plugins );
61 };
62
63
64
65
66
67
68 }
69 }