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

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