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
7d6298d8
Commit
7d6298d8
authored
May 12, 2014
by
Damien Walsh
Committed by
Fabien Potencier
Jun 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve exception messages for mount()
parent
b0aa888c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/Silex/Application.php
src/Silex/Application.php
+6
-0
No files found.
src/Silex/Application.php
View file @
7d6298d8
...
@@ -466,11 +466,17 @@ class Application extends Container implements HttpKernelInterface, TerminableIn
...
@@ -466,11 +466,17 @@ class Application extends Container implements HttpKernelInterface, TerminableIn
* @param ControllerCollection|ControllerProviderInterface $controllers A ControllerCollection or a ControllerProviderInterface instance
* @param ControllerCollection|ControllerProviderInterface $controllers A ControllerCollection or a ControllerProviderInterface instance
*
*
* @return Application
* @return Application
*
* @throws \LogicException
*/
*/
public
function
mount
(
$prefix
,
$controllers
)
public
function
mount
(
$prefix
,
$controllers
)
{
{
if
(
$controllers
instanceof
ControllerProviderInterface
)
{
if
(
$controllers
instanceof
ControllerProviderInterface
)
{
$controllers
=
$controllers
->
connect
(
$this
);
$controllers
=
$controllers
->
connect
(
$this
);
if
(
!
$controllers
instanceof
ControllerCollection
)
{
throw
new
\LogicException
(
'The "connect" method of the ControllerProviderInterface must return a ControllerCollection.'
);
}
}
}
if
(
!
$controllers
instanceof
ControllerCollection
)
{
if
(
!
$controllers
instanceof
ControllerCollection
)
{
...
...
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