1 | <?php |
||
12 | class Stencil_Installables { |
||
13 | |||
14 | /** |
||
15 | * List of registered installables. |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | private $installables = array(); |
||
20 | |||
21 | /** |
||
22 | * Register all installable items. |
||
23 | */ |
||
24 | public function __construct() { |
||
38 | |||
39 | /** |
||
40 | * Add an installable to the list. |
||
41 | * |
||
42 | * @param Stencil_Installable_Interface $installable Installable to add. |
||
43 | */ |
||
44 | public function add_installable( Stencil_Installable_Interface $installable ) { |
||
47 | |||
48 | /** |
||
49 | * Get Installable by slug. |
||
50 | * |
||
51 | * @param string $slug Slug to find. |
||
52 | * |
||
53 | * @return mixed|null |
||
54 | */ |
||
55 | public function get_by_slug( $slug ) { |
||
64 | |||
65 | /** |
||
66 | * Retrieve all plugins |
||
67 | * |
||
68 | * @return Iterator list of Plugins. |
||
69 | */ |
||
70 | public function get_plugins() { |
||
73 | |||
74 | /** |
||
75 | * Get all registered themes. |
||
76 | * |
||
77 | * @return Iterator list of Themes. |
||
78 | */ |
||
79 | public function get_themes() { |
||
82 | |||
83 | /** |
||
84 | * Get upgradable installables |
||
85 | * |
||
86 | * @return array of upgradable installables. |
||
87 | */ |
||
88 | public function get_upgradable() { |
||
99 | |||
100 | /** |
||
101 | * Get specific installables. |
||
102 | * |
||
103 | * @param string $class Class to get objects of. |
||
104 | * |
||
105 | * @return array |
||
106 | */ |
||
107 | private function get_installable_filtered( $class ) { |
||
118 | } |
||
119 |