PluginProbe ʕ •ᴥ•ʔ
Admin Columns / 3.0.5
Admin Columns v3.0.5
7.0.19 2.3.5 2.4 2.4.1 2.4.10 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.6.1 2.5.6.2 2.5.6.3 2.5.6.4 3.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.7 3.1 3.1.1 3.1.10 3.1.2 3.1.3 3.1.5 3.2.3 3.2.7 3.3.1 3.4.1 3.4.6 3.4.8 4.0.1 4.0.3 4.1.6 4.2.2 4.2.5 4.3 4.3.2 4.4.1 4.4.4 4.4.5 4.5.5 4.6.1 4.7.18 4.7.19 4.7.20 4.7.7 7.0.13 7.0.14 7.0.16 trunk 1.0 1.1 1.1.3 1.2 1.2.1 1.3 1.3.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.5.1 1.4.6 1.4.6.1 1.4.6.2 1.4.6.3 1.4.6.4 1.4.7 1.4.8 1.4.9 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2 2.2.1 2.2.1.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.5.1 2.2.6 2.2.6.1 2.2.6.2 2.2.6.3 2.2.6.4 2.2.7 2.2.8 2.2.8.1 2.2.9 2.3.1 2.3.2 2.3.3
codepress-admin-columns / classes / Container.php
codepress-admin-columns / classes Last commit date
Addon 8 years ago Admin 8 years ago Column 8 years ago Helper 8 years ago ListScreen 8 years ago Meta 8 years ago Notice 8 years ago Plugin 8 years ago Relation 8 years ago Settings 8 years ago ThirdParty 8 years ago API.php 8 years ago Addon.php 8 years ago Addons.php 8 years ago Admin.php 8 years ago Autoloader.php 8 years ago Collection.php 8 years ago Column.php 8 years ago Container.php 8 years ago Groups.php 8 years ago Helper.php 8 years ago ListScreen.php 8 years ago ListScreenPost.php 8 years ago Plugin.php 8 years ago PluginInformation.php 8 years ago Preferences.php 8 years ago Relation.php 8 years ago TableScreen.php 8 years ago View.php 8 years ago ViewInterface.php 8 years ago
Container.php
56 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 class AC_Container {
8
9 /**
10 * @var object[]
11 */
12 protected $services = array();
13
14 /**
15 * @param string $id
16 *
17 * @return false|object
18 */
19 public function get( $id ) {
20 return $this->has( $id ) ? $this->services[ $id ] : false;
21 }
22
23 /**
24 * @param string $id
25 * @param object $service
26 *
27 * @return $this
28 */
29 public function set( $id, $service ) {
30 if ( ! is_object( $service ) ) {
31 throw new InvalidArgumentException( sprintf( 'The %s service is not an object.', $id ) );
32 }
33
34 $this->services[ $id ] = $service;
35
36 return $this;
37 }
38
39 /**
40 * @param string $id
41 *
42 * @return bool
43 */
44 public function has( $id ) {
45 return array_key_exists( $id, $this->services );
46 }
47
48 /**
49 * @return string[]
50 */
51 public function get_ids() {
52 return array_keys( $this->services );
53 }
54
55 }
56