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
36b879b3
Commit
36b879b3
authored
Mar 07, 2013
by
Dave Marshall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use addPrefix to avoid deprecated calls in >2.2.0
parent
9705ba7d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/Silex/Application.php
src/Silex/Application.php
+2
-2
src/Silex/ControllerCollection.php
src/Silex/ControllerCollection.php
+2
-0
No files found.
src/Silex/Application.php
View file @
36b879b3
...
@@ -364,7 +364,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
...
@@ -364,7 +364,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
*/
*/
public
function
flush
(
$prefix
=
''
)
public
function
flush
(
$prefix
=
''
)
{
{
$this
[
'routes'
]
->
addCollection
(
$this
[
'controllers'
]
->
flush
(
$prefix
)
,
$prefix
);
$this
[
'routes'
]
->
addCollection
(
$this
[
'controllers'
]
->
flush
(
$prefix
));
}
}
/**
/**
...
@@ -462,7 +462,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
...
@@ -462,7 +462,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
throw
new
\LogicException
(
'The "mount" method takes either a ControllerCollection or a ControllerProviderInterface instance.'
);
throw
new
\LogicException
(
'The "mount" method takes either a ControllerCollection or a ControllerProviderInterface instance.'
);
}
}
$this
[
'routes'
]
->
addCollection
(
$controllers
->
flush
(
$prefix
)
,
$prefix
);
$this
[
'routes'
]
->
addCollection
(
$controllers
->
flush
(
$prefix
));
return
$this
;
return
$this
;
}
}
...
...
src/Silex/ControllerCollection.php
View file @
36b879b3
...
@@ -148,6 +148,8 @@ class ControllerCollection
...
@@ -148,6 +148,8 @@ class ControllerCollection
$controller
->
freeze
();
$controller
->
freeze
();
}
}
$routes
->
addPrefix
(
$prefix
);
$this
->
controllers
=
array
();
$this
->
controllers
=
array
();
return
$routes
;
return
$routes
;
...
...
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