PluginProbe
Depicter — Popup & Slider Builder / trunk
Depicter — Popup & Slider Builder vtrunk
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 trunk, at app/src/DataSources/ServiceProvider.php

108 lines 2.7 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\Catalog;
6 use Depicter\DataSources\Tags\GooglePlace;
7 use Depicter\DataSources\Tags\GooglePlaceReview;
8 use Depicter\DataSources\Tags\Legacy;
9 use Depicter\DataSources\Tags\Post;
10 use Depicter\DataSources\Tags\MetaBoxIO;
11 use Depicter\DataSources\Tags\MetaFields;
12 use Depicter\DataSources\Tags\Product;
13 use Depicter\DataSources\Tags\Taxonomy;
14 use WPEmerge\ServiceProviders\ServiceProviderInterface;
15
16
17 class ServiceProvider implements ServiceProviderInterface
18 {
19 /**
20 * {@inheritDoc}
21 */
22 public function register( $container ) {
23 $app = $container[ WPEMERGE_APPLICATION_KEY ];
24
25 // register dataSource manager
26 $container[ 'depicter.dataSources.dataSource' ] = function () {
27 return new Manager();
28 };
29 $app->alias( 'dataSource', 'depicter.dataSources.dataSource' );
30
31
32 // register posts dataSource
33 $container[ 'depicter.dataSources.posts' ] = function () {
34 return new Posts();
35 };
36
37 // register products dataSource
38 $container[ 'depicter.dataSources.products' ] = function () {
39 return new Products();
40 };
41
42 // register handpicked products dataSource
43 $container[ 'depicter.dataSources.handPickedProducts' ] = function () {
44 return new HandPickedProducts();
45 };
46
47 // register Google Places Reviews dataSource
48 $container[ 'depicter.dataSources.google.places' ] = function () {
49 return new GooglePlaces();
50 };
51
52 // register catalog dataSource
53 $container[ 'depicter.dataSources.catalogs' ] = function () {
54 return new Catalogs();
55 };
56
57 // dynamic tag modules
58 $container[ 'depicter.dataSources.tags.manager' ] = function () {
59 return new \Depicter\DataSources\Tags\Manager();
60 };
61
62 $container[ 'depicter.dataSources.tags.legacy' ] = function () {
63 return new Legacy();
64 };
65
66 $container[ 'depicter.dataSources.tags.post' ] = function () {
67 return new Post();
68 };
69
70 $container[ 'depicter.dataSources.tags.taxonomy' ] = function () {
71 return new Taxonomy();
72 };
73
74 $container[ 'depicter.dataSources.tags.product' ] = function () {
75 return new Product();
76 };
77
78 $container[ 'depicter.dataSources.tags.acf' ] = function () {
79 return new ACF();
80 };
81
82 $container[ 'depicter.dataSources.tags.metaboxio' ] = function () {
83 return new MetaBoxIO();
84 };
85
86 $container[ 'depicter.dataSources.tags.metafield' ] = function () {
87 return new MetaFields();
88 };
89
90 $container[ 'depicter.dataSources.tags.catalog' ] = function () {
91 return new Catalog();
92 };
93
94 $container[ 'depicter.dataSources.tags.googlePlace' ] = function () {
95 return new GooglePlace();
96 };
97
98 $container[ 'depicter.dataSources.tags.googlePlaceReview' ] = function () {
99 return new GooglePlaceReview();
100 };
101 }
102
103 /**
104 * {@inheritDoc}
105 */
106 public function bootstrap( $container ) {}
107 }
108