forked from crouillon/BackBee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApplicationInterface.php
168 lines (141 loc) · 3.51 KB
/
ApplicationInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
/*
* Copyright (c) 2011-2015 Lp digital system
*
* This file is part of BackBee.
*
* BackBee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BackBee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with BackBee. If not, see <http://www.gnu.org/licenses/>.
*
* @author Charles Rouillon <charles.rouillon@lp-digital.fr>
*/
namespace BackBee;
use BackBee\Console\Console;
use BackBee\Site\Site;
/**
* BackBee5 application interface.
*
* @category BackBee
*
* @copyright Lp digital system
* @author c.rouillon <charles.rouillon@lp-digital.fr>, e.chau <eric.chau@lp-digital.fr>
*/
interface ApplicationInterface
{
const DEFAULT_CONTEXT = 'default';
const DEFAULT_ENVIRONMENT = '';
/**
* @param \BackBee\Site\Site $site
*/
public function start(Site $site = null);
/**
* @return boolean
*/
public function isStarted();
/**
* Stop the current BBApplication instance.
*/
public function stop();
/**
* Returns the starting context.
*
* @return string
*/
public function getContext();
/**
* Returns the starting context.
*
* @return string
*/
public function getEnvironment();
/**
* @return string
*/
public function getBBDir();
/**
* @return string
*/
public function getBaseDir();
/**
* @return string
*/
public function getBaseRepository();
/**
* @return string
*/
public function getRepository();
/**
* @return BackBee\Config\Config
*/
public function getConfig();
/**
* @return string
*/
public function getConfigDir();
/**
* Returns path to Data directory.
*
* @return string absolute path to Data directory
*/
public function getDataDir();
/**
* Return the resource directories, if undefined, initialized with common resources.
*
* @return string[] The resource directories.
*/
public function getResourceDir();
/**
* Return the classcontent repositories path for this instance.
*
* @return string[] The class contents directories
*/
public function getClassContentDir();
/**
* @return BackBee\Controller\FrontController
*/
public function getController();
/**
* @return BackBee\Routing\RouteCollection
*/
public function getRouting();
/**
* @return AutoLoader
*/
public function getAutoloader();
/**
* @return BackBee\DependencyInjection\ContainerInterface
*/
public function getContainer();
/**
* @return boolean
*/
public function isOverridedConfig();
/**
* @return boolean
*/
public function isDebugMode();
/**
* @return Site
*/
public function getSite();
/**
* Is the BackBee application started as SAPI client?
*
* @return boolean Returns true is application started as SAPI client, false otherwise
*/
public function isClientSAPI();
/**
*
*/
public function registerCommands(Console $console);
}