15479603
Alex Savenko
initialize
|
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
|
public function run(Api $api, DiInterface $di, Config $config)
{
$api->get('/', function() use ($api) {
/** @var \Phalcon\Mvc\View\Simple $view */
$view = $api->di->get(Services::VIEW);
return $view->render('general/index');
});
$api->get('/proxy.html', function() use ($api, $config) {
/** @var \Phalcon\Mvc\View\Simple $view */
$view = $api->di->get(Services::VIEW);
$view->setVar('client', $config->clientHostName);
return $view->render('general/proxy');
});
$api->get('/documentation.html', function() use ($api, $config) {
/** @var \Phalcon\Mvc\View\Simple $view */
$view = $api->di->get(Services::VIEW);
$view->setVar('title', $config->application->title);
$view->setVar('description', $config->application->description);
$view->setVar('documentationPath', $config->hostName . '/export/documentation.json');
return $view->render('general/documentation');
});
|