-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
78 lines (62 loc) · 1.88 KB
/
index.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
<?php
error_reporting(E_ALL|E_STRICT);
define('APP_PATH','.');
date_default_timezone_set('Europe/Helsinki');
set_include_path('.' .
PATH_SEPARATOR . APP_PATH . '/library' .
PATH_SEPARATOR . APP_PATH . '/application/models/' .
PATH_SEPARATOR . get_include_path());
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
Zend_Layout::startMvc(array('layoutPath' => APP_PATH .'/application/layouts'));
$fc = Zend_Controller_Front::getInstance();
$router = $fc->getRouter();
$router->addRoute('library', new Zend_Controller_Router_Route(
'library/:library', array(
'controller' => 'library',
'action' => 'package',
'module' => 'default'
)
));
$router->addRoute('library-action', new Zend_Controller_Router_Route(
'library/:library/:action', array(
'controller' => 'library',
'module' => 'default'
)
));
$router->addRoute('library-dependencies', new Zend_Controller_Router_Route(
'library/:library/dependencies/:class', array(
'action' => 'dependencies',
'controller' => 'library',
'module' => 'default'
)
));
$router->addRoute('library-package', new Zend_Controller_Router_Route(
'library/:library/package/:package/:parent', array(
'action' => 'package',
'controller' => 'library',
'module' => 'default',
'parent' => ''
)
));
$router->addRoute('library-packet', new Zend_Controller_Router_Route(
'library/:library/packet/:class/:format', array(
'action' => 'packet',
'controller' => 'library',
'module' => 'default'
)
));
$router->addRoute('library-packet-post', new Zend_Controller_Router_Route(
'library/:library/packet/', array(
'action' => 'packet',
'controller' => 'library',
'module' => 'default'
)
));
$fc->setBaseUrl('/pack')
->throwExceptions(true)
->setParam('disableOutputBuffering',true)
->returnResponse(true)
->addModuleDirectory(APP_PATH . '/application/modules');
$response = $fc->dispatch();
$response->sendResponse();