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
f04f777b
Commit
f04f777b
authored
Aug 23, 2013
by
Tobias Schultze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use constants for url generator
available since symfony 2.3 which is also the requirement of silex master
parent
1f1fc4e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/Silex/Application/UrlGeneratorTrait.php
src/Silex/Application/UrlGeneratorTrait.php
+4
-2
No files found.
src/Silex/Application/UrlGeneratorTrait.php
View file @
f04f777b
...
...
@@ -11,6 +11,8 @@
namespace
Silex\Application
;
use
Symfony\Component\Routing\Generator\UrlGeneratorInterface
;
/**
* UrlGenerator trait.
*
...
...
@@ -28,7 +30,7 @@ trait UrlGeneratorTrait
*/
public
function
path
(
$route
,
$parameters
=
array
())
{
return
$this
[
'url_generator'
]
->
generate
(
$route
,
$parameters
,
false
);
return
$this
[
'url_generator'
]
->
generate
(
$route
,
$parameters
,
UrlGeneratorInterface
::
ABSOLUTE_PATH
);
}
/**
...
...
@@ -41,6 +43,6 @@ trait UrlGeneratorTrait
*/
public
function
url
(
$route
,
$parameters
=
array
())
{
return
$this
[
'url_generator'
]
->
generate
(
$route
,
$parameters
,
true
);
return
$this
[
'url_generator'
]
->
generate
(
$route
,
$parameters
,
UrlGeneratorInterface
::
ABSOLUTE_URL
);
}
}
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