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
a868919b
Commit
a868919b
authored
Nov 26, 2012
by
Igor Wiedler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename mount() argument from $app to $controllers
App is a legacy name, the usage of the method has changed
parent
7e5e1f88
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/Silex/Application.php
src/Silex/Application.php
+8
-8
No files found.
src/Silex/Application.php
View file @
a868919b
...
...
@@ -414,22 +414,22 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
}
/**
* Mounts
an application
under the given route prefix.
* Mounts
controllers
under the given route prefix.
*
* @param string $prefix The route prefix
* @param ControllerCollection|ControllerProviderInterface $
app
A ControllerCollection or a ControllerProviderInterface instance
* @param ControllerCollection|ControllerProviderInterface $
controllers
A ControllerCollection or a ControllerProviderInterface instance
*/
public
function
mount
(
$prefix
,
$
app
)
public
function
mount
(
$prefix
,
$
controllers
)
{
if
(
$
app
instanceof
ControllerProviderInterface
)
{
$
app
=
$app
->
connect
(
$this
);
if
(
$
controllers
instanceof
ControllerProviderInterface
)
{
$
controllers
=
$controllers
->
connect
(
$this
);
}
if
(
!
$
app
instanceof
ControllerCollection
)
{
if
(
!
$
controllers
instanceof
ControllerCollection
)
{
throw
new
\LogicException
(
'The "mount" method takes either a ControllerCollection or a ControllerProviderInterface instance.'
);
}
$this
[
'routes'
]
->
addCollection
(
$
app
->
flush
(
$prefix
),
$prefix
);
$this
[
'routes'
]
->
addCollection
(
$
controllers
->
flush
(
$prefix
),
$prefix
);
}
/**
...
...
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