PluginProbe
Depicter — Popup & Slider Builder / 1.6.2
Depicter — Popup & Slider Builder v1.6.2
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
depicter / app / src / DataSources / ServiceProvider.php

ServiceProvider.php in Depicter — Popup & Slider Builder 1.6.2, at app/src/DataSources/ServiceProvider.php

83 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Depicter\DataSources;
3
4 use Depicter\DataSources\Tags\ACF;
5 use Depicter\DataSources\Tags\Legacy;
6 use Depicter\DataSources\Tags\Post;
7 use Depicter\DataSources\Tags\MetaBoxIO;
8 use Depicter\DataSources\Tags\MetaFields;
9 use Depicter\DataSources\Tags\Product;
10 use Depicter\DataSources\Tags\Taxonomy;
11 use WPEmerge\ServiceProviders\ServiceProviderInterface;
12
13
14 class ServiceProvider implements ServiceProviderInterface
15 {
16 /**
17 * {@inheritDoc}
18 */
19 public function register( $container ) {
20 $app = $container[ WPEMERGE_APPLICATION_KEY ];
21
22 // register dataSource manager
23 $container[ 'depicter.dataSources.dataSource' ] = function () {
24 return new Manager();
25 };
26 $app->alias( 'dataSource', 'depicter.dataSources.dataSource' );
27
28
29 // register posts dataSource
30 $container[ 'depicter.dataSources.posts' ] = function () {
31 return new Posts();
32 };
33
34 // register products dataSource
35 $container[ 'depicter.dataSources.products' ] = function () {
36 return new Products();
37 };
38
39 // register handpicked products dataSource
40 $container[ 'depicter.dataSources.handPickedProducts' ] = function () {
41 return new HandPickedProducts();
42 };
43
44 // dynamic tag modules
45 $container[ 'depicter.dataSources.tags.manager' ] = function () {
46 return new \Depicter\DataSources\Tags\Manager();
47 };
48
49 $container[ 'depicter.dataSources.tags.legacy' ] = function () {
50 return new Legacy();
51 };
52
53 $container[ 'depicter.dataSources.tags.post' ] = function () {
54 return new Post();
55 };
56
57 $container[ 'depicter.dataSources.tags.taxonomy' ] = function () {
58 return new Taxonomy();
59 };
60
61 $container[ 'depicter.dataSources.tags.product' ] = function () {
62 return new Product();
63 };
64
65 $container[ 'depicter.dataSources.tags.acf' ] = function () {
66 return new ACF();
67 };
68
69 $container[ 'depicter.dataSources.tags.metaboxio' ] = function () {
70 return new MetaBoxIO();
71 };
72
73 $container[ 'depicter.dataSources.tags.metafield' ] = function () {
74 return new MetaFields();
75 };
76 }
77
78 /**
79 * {@inheritDoc}
80 */
81 public function bootstrap( $container ) {}
82 }
83