-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Fluid interface for building routes in PHP #15778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
51f60fc
6891ec8
4e430a0
0ddadc5
06ea900
6b922a6
14518ed
7972fc9
e11b7e0
4d90916
729ccbb
e509953
01e1329
e39e0c4
df1849f
97b1eea
e1ecde4
ecf4346
0dce55d
f3d71ad
8132fcb
b2676ec
bf6790b
61e4bf7
8f0b956
fbab6d4
012cb92
33255dd
356b114
7cb8996
573a7f1
83f3194
26d656b
42e73a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,6 +127,7 @@ public function addBuilder(RouteCollectionBuilder $builder) | |
* | ||
* @param RouteCollection $collection | ||
* @param string|null $prefix | ||
* | ||
* @return $this | ||
*/ | ||
public function addRouteCollection(RouteCollection $collection, $prefix = null) | ||
|
@@ -151,6 +152,7 @@ public function addRouteCollection(RouteCollection $collection, $prefix = null) | |
* | ||
* @param Route $route | ||
* @param string|null $name | ||
* | ||
* @return $this | ||
*/ | ||
public function addRoute(Route $route, $name = null) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Symfony, we try to use simple There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just seen the |
||
|
@@ -361,7 +363,7 @@ public function build() | |
|
||
$routeCollection->add($name, $route); | ||
} else { | ||
/** @var self $route */ | ||
/* @var self $route */ | ||
|
||
$subCollection = $route->build(); | ||
$subCollection->addPrefix($this->prefix); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove this one from the public API; the
createBuilder()
one is probably enough. If not, why would I use a builder instead of creating a route collection directly?