Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
6d6cb0fd
Commit
6d6cb0fd
authored
Mar 27, 2011
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated to the latest version of Pimple
parent
175ebfe2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
src/Silex/Application.php
src/Silex/Application.php
+6
-6
src/Silex/TwigExtension.php
src/Silex/TwigExtension.php
+2
-2
vendor/pimple
vendor/pimple
+1
-1
No files found.
src/Silex/Application.php
View file @
6d6cb0fd
...
@@ -46,22 +46,22 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
...
@@ -46,22 +46,22 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
{
{
$app
=
$this
;
$app
=
$this
;
$this
[
'autoloader'
]
=
$this
->
asShared
(
function
()
{
$this
[
'autoloader'
]
=
$this
->
share
(
function
()
{
$loader
=
new
UniversalClassLoader
();
$loader
=
new
UniversalClassLoader
();
$loader
->
register
();
$loader
->
register
();
return
$loader
;
return
$loader
;
});
});
$this
[
'routes'
]
=
$this
->
asShared
(
function
()
{
$this
[
'routes'
]
=
$this
->
share
(
function
()
{
return
new
RouteCollection
();
return
new
RouteCollection
();
});
});
$this
[
'controllers'
]
=
$this
->
asShared
(
function
()
use
(
$app
)
{
$this
[
'controllers'
]
=
$this
->
share
(
function
()
use
(
$app
)
{
return
new
ControllerCollection
(
$app
[
'routes'
]);
return
new
ControllerCollection
(
$app
[
'routes'
]);
});
});
$this
[
'dispatcher'
]
=
$this
->
asShared
(
function
()
use
(
$app
)
{
$this
[
'dispatcher'
]
=
$this
->
share
(
function
()
use
(
$app
)
{
$dispatcher
=
new
EventDispatcher
();
$dispatcher
=
new
EventDispatcher
();
$dispatcher
->
addSubscriber
(
$app
);
$dispatcher
->
addSubscriber
(
$app
);
$dispatcher
->
addListener
(
HttpKernelEvents
::
onCoreView
,
$app
,
-
10
);
$dispatcher
->
addListener
(
HttpKernelEvents
::
onCoreView
,
$app
,
-
10
);
...
@@ -69,11 +69,11 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
...
@@ -69,11 +69,11 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
return
$dispatcher
;
return
$dispatcher
;
});
});
$this
[
'resolver'
]
=
$this
->
asShared
(
function
()
{
$this
[
'resolver'
]
=
$this
->
share
(
function
()
{
return
new
ControllerResolver
();
return
new
ControllerResolver
();
});
});
$this
[
'kernel'
]
=
$this
->
asShared
(
function
()
use
(
$app
)
{
$this
[
'kernel'
]
=
$this
->
share
(
function
()
use
(
$app
)
{
return
new
HttpKernel
(
$app
[
'dispatcher'
],
$app
[
'resolver'
]);
return
new
HttpKernel
(
$app
[
'dispatcher'
],
$app
[
'resolver'
]);
});
});
}
}
...
...
src/Silex/TwigExtension.php
View file @
6d6cb0fd
...
@@ -15,14 +15,14 @@ class TwigExtension implements ExtensionInterface
...
@@ -15,14 +15,14 @@ class TwigExtension implements ExtensionInterface
{
{
public
function
register
(
Application
$app
)
public
function
register
(
Application
$app
)
{
{
$app
[
'twig'
]
=
$app
->
asShared
(
function
()
use
(
$app
)
{
$app
[
'twig'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
$twig
=
new
\Twig_Environment
(
$app
[
'twig.loader'
],
$app
[
'twig.options'
]);
$twig
=
new
\Twig_Environment
(
$app
[
'twig.loader'
],
$app
[
'twig.options'
]);
$twig
->
addGlobal
(
'app'
,
$app
);
$twig
->
addGlobal
(
'app'
,
$app
);
return
$twig
;
return
$twig
;
});
});
$app
[
'twig.loader'
]
=
$app
->
asShared
(
function
()
use
(
$app
)
{
$app
[
'twig.loader'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
return
new
\Twig_Loader_Filesystem
(
$app
[
'twig.path'
]);
return
new
\Twig_Loader_Filesystem
(
$app
[
'twig.path'
]);
});
});
...
...
pimple
@
597a5314
Subproject commit
0f20b9db3f19898a39fb0e751cd6ec1274696da8
Subproject commit
597a5314a384c03534795397652b5a0e2d497a31
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment