PluginProbe
UpStream: a Project Management Plugin for WordPress / 1.39.3
UpStream: a Project Management Plugin for WordPress v1.39.3
trunk 1.39.0 1.39.1 1.39.2 1.39.3 2.0.7 2.1.0
upstream / includes / class-up-container.php

class-up-container.php in UpStream: a Project Management Plugin for WordPress 1.39.3, at includes/class-up-container.php

52 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use Allex\Core;
4
5 class Container extends \Pimple\Container
6 {
7 /**
8 * Instance of the Pimple container
9 */
10 protected static $instance;
11
12 public static function get_instance()
13 {
14 if (empty(static::$instance)) {
15 $instance = new self;
16
17 // Define the services
18 $instance['PLUGIN_BASENAME'] = function ($c) {
19 return plugin_basename('upstream/upstream.php');
20 };
21
22 $instance['EDD_API_URL'] = function ($c) {
23 return 'https://upstreamplugin.com';
24 };
25
26 $instance['PLUGIN_AUTHOR'] = function ($c) {
27 return 'UpStream';
28 };
29
30 $instance['UPDATES_DOC_URL'] = function ($c) {
31 //@todo: Update this link adding an specific page for this subject.
32 return 'http://upstreamplugin.com/docs/';
33 };
34
35 $instance['framework'] = function ($c) {
36 return new Core($c['PLUGIN_BASENAME'], $c['EDD_API_URL'], $c['PLUGIN_AUTHOR'],
37 $c['UPDATES_DOC_URL']);
38 };
39
40 if (is_admin()) {
41 $instance['reviews'] = function ($c) {
42 return new UpStream_Admin_Reviews();
43 };
44 }
45
46 static::$instance = $instance;
47 }
48
49 return static::$instance;
50 }
51 }
52