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
e4641d41
Commit
e4641d41
authored
Jun 15, 2012
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made the code more readable
parent
c89133e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/Silex/Application.php
src/Silex/Application.php
+5
-2
No files found.
src/Silex/Application.php
View file @
e4641d41
...
@@ -370,7 +370,9 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
...
@@ -370,7 +370,9 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
$result
=
call_user_func
(
$callback
,
$exception
,
$code
);
$result
=
call_user_func
(
$callback
,
$exception
,
$code
);
if
(
null
!==
$result
)
{
if
(
null
!==
$result
)
{
$event
->
setResponse
(
$result
instanceof
Response
?
$result
:
new
Response
((
string
)
$result
));
$response
=
$result
instanceof
Response
?
$result
:
new
Response
((
string
)
$result
);
$event
->
setResponse
(
$response
);
}
}
},
$priority
);
},
$priority
);
}
}
...
@@ -567,8 +569,9 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
...
@@ -567,8 +569,9 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
public
function
onKernelView
(
GetResponseForControllerResultEvent
$event
)
public
function
onKernelView
(
GetResponseForControllerResultEvent
$event
)
{
{
$response
=
$event
->
getControllerResult
();
$response
=
$event
->
getControllerResult
();
$response
=
$response
instanceof
Response
?
$response
:
new
Response
((
string
)
$response
);
$event
->
setResponse
(
$response
instanceof
Response
?
$response
:
new
Response
((
string
)
$response
)
);
$event
->
setResponse
(
$response
);
}
}
/**
/**
...
...
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