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
d669a7d5
Commit
d669a7d5
authored
Nov 04, 2012
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made a small refactoring for better consistency
parent
deb42381
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/Silex/Application.php
src/Silex/Application.php
+4
-2
No files found.
src/Silex/Application.php
View file @
d669a7d5
...
@@ -277,9 +277,11 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
...
@@ -277,9 +277,11 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
public
function
after
(
$callback
,
$priority
=
0
)
public
function
after
(
$callback
,
$priority
=
0
)
{
{
$this
[
'dispatcher'
]
->
addListener
(
KernelEvents
::
RESPONSE
,
function
(
FilterResponseEvent
$event
)
use
(
$callback
)
{
$this
[
'dispatcher'
]
->
addListener
(
KernelEvents
::
RESPONSE
,
function
(
FilterResponseEvent
$event
)
use
(
$callback
)
{
if
(
HttpKernelInterface
::
MASTER_REQUEST
=
==
$event
->
getRequestType
())
{
if
(
HttpKernelInterface
::
MASTER_REQUEST
!
==
$event
->
getRequestType
())
{
call_user_func
(
$callback
,
$event
->
getRequest
(),
$event
->
getResponse
())
;
return
;
}
}
call_user_func
(
$callback
,
$event
->
getRequest
(),
$event
->
getResponse
());
},
$priority
);
},
$priority
);
}
}
...
...
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