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
614571a8
Commit
614571a8
authored
May 01, 2012
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made the terminate implementation more consistent with other event implementations
parent
c9dc3f49
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
src/Silex/Application.php
src/Silex/Application.php
+13
-5
No files found.
src/Silex/Application.php
View file @
614571a8
...
@@ -431,6 +431,14 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
...
@@ -431,6 +431,14 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
return
$this
[
'kernel'
]
->
handle
(
$request
,
$type
,
$catch
);
return
$this
[
'kernel'
]
->
handle
(
$request
,
$type
,
$catch
);
}
}
/**
* {@inheritdoc}
*/
public
function
terminate
(
Request
$request
,
Response
$response
)
{
$this
[
'kernel'
]
->
terminate
(
$request
,
$response
);
}
/**
/**
* Handles onEarlyKernelRequest events.
* Handles onEarlyKernelRequest events.
*
*
...
@@ -501,14 +509,13 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
...
@@ -501,14 +509,13 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
}
}
/**
/**
* Runs finish filters
, TerminableInterface implementation
* Runs finish filters
.
*
*
* @param Request $request
* Handler for onKernelTerminate.
* @param Response $response
*/
*/
public
function
terminate
(
Request
$request
,
Response
$response
)
public
function
onKernelTerminate
(
PostResponseEvent
$event
)
{
{
$this
[
'dispatcher'
]
->
dispatch
(
SilexEvents
::
FINISH
,
new
PostResponseEvent
(
$this
,
$request
,
$response
)
);
$this
[
'dispatcher'
]
->
dispatch
(
SilexEvents
::
FINISH
,
$event
);
}
}
/**
/**
...
@@ -547,6 +554,7 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
...
@@ -547,6 +554,7 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
KernelEvents
::
CONTROLLER
=>
'onKernelController'
,
KernelEvents
::
CONTROLLER
=>
'onKernelController'
,
KernelEvents
::
RESPONSE
=>
'onKernelResponse'
,
KernelEvents
::
RESPONSE
=>
'onKernelResponse'
,
KernelEvents
::
EXCEPTION
=>
'onKernelException'
,
KernelEvents
::
EXCEPTION
=>
'onKernelException'
,
KernelEvents
::
TERMINATE
=>
'onKernelTerminate'
,
KernelEvents
::
VIEW
=>
array
(
'onKernelView'
,
-
10
),
KernelEvents
::
VIEW
=>
array
(
'onKernelView'
,
-
10
),
);
);
}
}
...
...
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