1 | <?php |
||
19 | class WordPoints_Class_Registry implements WordPoints_Class_RegistryI { |
||
20 | |||
21 | /** |
||
22 | * The registered classes, indexed by slug. |
||
23 | * |
||
24 | * @since 1.0.0 |
||
25 | * |
||
26 | * @var string[] |
||
27 | */ |
||
28 | protected $classes = array(); |
||
29 | |||
30 | /** |
||
31 | * @since 1.0.0 |
||
32 | */ |
||
33 | public function get_all( array $args = array() ) { |
||
36 | |||
37 | /** |
||
38 | * @since 1.0.0 |
||
39 | */ |
||
40 | public function get_all_slugs() { |
||
43 | |||
44 | /** |
||
45 | * @since 1.0.0 |
||
46 | */ |
||
47 | public function get( $slug, array $args = array() ) { |
||
66 | |||
67 | /** |
||
68 | * @since 1.0.0 |
||
69 | */ |
||
70 | public function register( $slug, $class, array $args = array() ) { |
||
76 | |||
77 | /** |
||
78 | * @since 1.0.0 |
||
79 | */ |
||
80 | public function deregister( $slug ) { |
||
84 | |||
85 | /** |
||
86 | * @since 1.0.0 |
||
87 | */ |
||
88 | public function is_registered( $slug ) { |
||
92 | |||
93 | /** |
||
94 | * Construct an array of classes with the given arguments. |
||
95 | * |
||
96 | * @since 1.0.0 |
||
97 | * |
||
98 | * @param string[] $classes The classes, indexed by slug (which will be the first |
||
99 | * arg passed to the constructor before the other args). |
||
100 | * @param array $args An array of args to pass to the class constructor. |
||
101 | * |
||
102 | * @return object[] An array of the constructed objects. |
||
103 | */ |
||
104 | public static function construct_with_args( array $classes, array $args ) { |
||
128 | } |
||
129 | |||
131 |