-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
37 lines (27 loc) · 1.05 KB
/
bootstrap.php
File metadata and controls
37 lines (27 loc) · 1.05 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
<?php
require __DIR__ . '/src/p2ee/partletsMagentoBridge/Block/Example.php';
$app = new Silex\Application();
$app->register(new \Silex\Provider\TwigServiceProvider(), array(
'twig.path' => __DIR__.'/src/res/twig',
));
$app->register(new \p2ee\partletsMagentoBridge\SilexProvider\InjektorProvider(), [
'rg.injektor.config' => __DIR__.'/src/res/config/dic_config.php',
'rg.injector.factories' => __DIR__.'/generated/'
]);
$app->register(new \p2ee\partletsMagentoBridge\SilexProvider\PartletServiceProvider(), [
'partlets.baseNamespace' => '\p2ee\partletsMagentoBridge\Partlet',
]);
$app->error(function (\Exception $e, $code) {
switch ($code) {
case 404:
$message = 'The requested page could not be found.';
break;
default:
$message = 'We are sorry, but something went terribly wrong. :
<pre>
'.$e.'
</pre>';
}
return new \Symfony\Component\HttpFoundation\Response($message);
});
Mage::register('silex_partlets', $app);