Application.php
2.89 KB
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
<?php
namespace Phalcon\Mvc {
/**
* Phalcon\Mvc\Application
*
* This component encapsulates all the complex operations behind instantiating every component
* needed and integrating it with the rest to allow the MVC pattern to operate as desired.
*
*<code>
*
* class Application extends \Phalcon\Mvc\Application
* {
*
* /\**
* * Register the services here to make them general or register
* * in the ModuleDefinition to make them module-specific
* *\/
* protected function _registerServices()
* {
*
* }
*
* /\**
* * This method registers all the modules in the application
* *\/
* public function main()
* {
* $this->registerModules(array(
* 'frontend' => array(
* 'className' => 'Multiple\Frontend\Module',
* 'path' => '../apps/frontend/Module.php'
* ),
* 'backend' => array(
* 'className' => 'Multiple\Backend\Module',
* 'path' => '../apps/backend/Module.php'
* )
* ));
* }
* }
*
* $application = new Application();
* $application->main();
*
*</code>
*/
class Application extends \Phalcon\DI\Injectable implements \Phalcon\Events\EventsAwareInterface, \Phalcon\DI\InjectionAwareInterface {
protected $_defaultModule;
protected $_modules;
protected $_moduleObject;
protected $_implicitView;
/**
* \Phalcon\Mvc\Application
*
* @param \Phalcon\DI $dependencyInjector
*/
public function __construct($dependencyInjector=null){ }
/**
* By default. The view is implicitly buffering all the output
* You can full disable the view component using this method
*
* @param boolean $implicitView
* @return \Phalcon\Mvc\Application
*/
public function useImplicitView($implicitView){ }
/**
* Register an array of modules present in the application
*
*<code>
* $this->registerModules(array(
* 'frontend' => array(
* 'className' => 'Multiple\Frontend\Module',
* 'path' => '../apps/frontend/Module.php'
* ),
* 'backend' => array(
* 'className' => 'Multiple\Backend\Module',
* 'path' => '../apps/backend/Module.php'
* )
* ));
*</code>
*
* @param array $modules
* @param boolean $merge
* @param \Phalcon\Mvc\Application
*/
public function registerModules($modules, $merge=null){ }
/**
* Return the modules registered in the application
*
* @return array
*/
public function getModules(){ }
/**
* Sets the module name to be used if the router doesn't return a valid module
*
* @param string $defaultModule
* @return \Phalcon\Mvc\Application
*/
public function setDefaultModule($defaultModule){ }
/**
* Returns the default module name
*
* @return string
*/
public function getDefaultModule(){ }
/**
* Handles a MVC request
*
* @param string $uri
* @return \Phalcon\Http\ResponseInterface
*/
public function handle($uri=null){ }
}
}