1 | <?php namespace Intraxia\Jaxion\Core; |
||
15 | class Application extends Container implements ApplicationContract { |
||
16 | /** |
||
17 | * Define plugin version on Application. |
||
18 | */ |
||
19 | const VERSION = ''; |
||
20 | |||
21 | /** |
||
22 | * Singleton instance of the Application object |
||
23 | * |
||
24 | * @var Application[] |
||
25 | */ |
||
26 | protected static $instances = array(); |
||
27 | |||
28 | /** |
||
29 | * Instantiates a new Application container. |
||
30 | * |
||
31 | * The Application constructor enforces the presence of of a single instance |
||
32 | * of the Application. If an instance already exists, an Exception will be thrown. |
||
33 | * |
||
34 | * @param Config $config |
||
35 | * @param array $providers |
||
36 | * |
||
37 | * @throws ApplicationAlreadyBootedException |
||
38 | */ |
||
39 | 27 | public function __construct( $config, array $providers = array() ) { |
|
58 | |||
59 | /** |
||
60 | * {@inheritDoc} |
||
61 | * |
||
62 | * @throws UnexpectedValueException |
||
63 | */ |
||
64 | 12 | public function boot() { |
|
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | * |
||
91 | * @codeCoverageIgnore |
||
92 | */ |
||
93 | public function activate() { |
||
96 | |||
97 | /** |
||
98 | * {@inheritdoc} |
||
99 | * |
||
100 | * @codeCoverageIgnore |
||
101 | */ |
||
102 | public function deactivate() { |
||
105 | |||
106 | /** |
||
107 | * {@inheritDoc} |
||
108 | * |
||
109 | * @return Application |
||
110 | * @throws ApplicationNotBootedException |
||
111 | */ |
||
112 | 9 | public static function instance() { |
|
119 | |||
120 | /** |
||
121 | * {@inheritDoc} |
||
122 | */ |
||
123 | 30 | public static function shutdown() { |
|
128 | |||
129 | /** |
||
130 | * Sets the plugin's url, path, and basename. |
||
131 | * |
||
132 | * @param Config $config |
||
133 | */ |
||
134 | 18 | private function register_constants( Config $config ) { |
|
152 | |||
153 | /** |
||
154 | * Registers the built-in services with the Application container. |
||
155 | * |
||
156 | * @param Config $config |
||
157 | */ |
||
158 | 27 | private function register_core_services( Config $config ) { |
|
167 | } |
||
168 |