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
9e3a35c2
Commit
9e3a35c2
authored
Sep 22, 2014
by
jeroendedauw
Committed by
Fabien Potencier
Apr 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Type hint against EventDispatcherInterface
parent
58d04619
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/Silex/Application.php
src/Silex/Application.php
+5
-1
No files found.
src/Silex/Application.php
View file @
9e3a35c2
...
...
@@ -11,6 +11,7 @@
namespace
Silex
;
use
Symfony\Component\EventDispatcher\EventDispatcherInterface
;
use
Symfony\Component\HttpFoundation\BinaryFileResponse
;
use
Symfony\Component\HttpKernel\HttpKernel
;
use
Symfony\Component\HttpKernel\HttpKernelInterface
;
...
...
@@ -88,6 +89,9 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
$this
[
'dispatcher_class'
]
=
'Symfony\\Component\\EventDispatcher\\EventDispatcher'
;
$this
[
'dispatcher'
]
=
$this
->
share
(
function
()
use
(
$app
)
{
/**
* @var EventDispatcherInterface $dispatcher
*/
$dispatcher
=
new
$app
[
'dispatcher_class'
]();
$urlMatcher
=
new
LazyUrlMatcher
(
function
()
use
(
$app
)
{
...
...
@@ -288,7 +292,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
return
;
}
$this
[
'dispatcher'
]
=
$this
->
share
(
$this
->
extend
(
'dispatcher'
,
function
(
$dispatcher
,
$app
)
use
(
$callback
,
$priority
,
$eventName
)
{
$this
[
'dispatcher'
]
=
$this
->
share
(
$this
->
extend
(
'dispatcher'
,
function
(
EventDispatcherInterface
$dispatcher
,
$app
)
use
(
$callback
,
$priority
,
$eventName
)
{
$dispatcher
->
addListener
(
$eventName
,
$app
[
'callback_resolver'
]
->
resolveCallback
(
$callback
),
$priority
);
return
$dispatcher
;
...
...
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