Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle] adds routing/container descriptors#7887

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
20 commits
Select commitHold shift + click to select a range
0130339
[FrameworkBundle] added routing descriptors
jfsimonApr 30, 2013
ed83497
[FrameworkBundle] added text container descriptors
jfsimonMay 7, 2013
dc7eb94
[FrameworkBundle] added descriptor helper & missing methods
jfsimonMay 7, 2013
821c5b0
[FrameworkBundle] added container service & alias descriptors
jfsimonMay 31, 2013
651d809
[FrameworkBundle] added container services description
jfsimonJun 2, 2013
800d3f5
[FrameworkBundle] added container services description by tag
jfsimonJun 2, 2013
535c786
[FrameworkBundle] added container parameters description
jfsimonJun 2, 2013
603c1b2
[FrameworkBundle] added container tags descriptions
jfsimonJun 3, 2013
3aa7438
[FrameworkBundle] added descriptors usage in router:debug command
jfsimonJun 4, 2013
036da08
[FrameworkBundle] added container parameters sorting in descriptors
jfsimonJun 4, 2013
2290a99
[FrameworkBundle] added container services sorting in descriptors
jfsimonJun 4, 2013
1747d26
[FrameworkBundle] added single service descriptor
jfsimonJun 4, 2013
ca6e90d
[FrameworkBundle] added descriptors usage in container:debug command
jfsimonJun 4, 2013
bcc3ae3
[FrameworkBundle] applied advices from gh comments
jfsimonJun 4, 2013
8e84dac
[FrameworkBundle] fixed json & md decriptors
jfsimonSep 19, 2013
d6ef568
[FrameworkBundle] fixed text & xml descriptors
jfsimonSep 20, 2013
52b331b
[FrameworkBundle] added table helper usage to descriptors
jfsimonSep 23, 2013
b8fa077
[FrameworkBundle] fixed xml route description
jfsimonSep 27, 2013
29a940d
[FrameworkBundle] changed xml routing
jfsimonSep 27, 2013
ad939b6
[FrameworkBundle] added route host regex to xml descriptors
jfsimonSep 29, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
[FrameworkBundle] fixed xml route description
  • Loading branch information
@jfsimon
jfsimon committedSep 27, 2013
commitb8fa07760796b0b48f158edf40bd108a7a260837
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -160,7 +160,7 @@ private function getRouteDocument(Route $route, $name = null)
unset($requirements['_scheme'], $requirements['_method']);
if (count($requirements)) {
$routeXML->appendChild($requirementsXML = $dom->createElement('requirements'));
foreach ($route->getOptions() as $attribute => $pattern) {
foreach ($requirements as $attribute => $pattern) {
$requirementsXML->appendChild($requirementXML = $dom->createElement('requirement'));
$requirementXML->setAttribute('attribute', $attribute);
$requirementXML->appendChild(new \DOMText($pattern));
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,13 +9,11 @@
<default attribute="name">Joseph</default>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

instead of "attribute" I would name this "name". so<default name="...">

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

option tag already uses aname attribute, I guess it would be more consistent.

</defaults>
<requirements>
<requirement attribute="compiler_class">Symfony\Component\Routing\RouteCompiler</requirement>
<requirement attribute="opt1">val1</requirement>
<requirement attribute="opt2">val2</requirement>
<requirement attribute="name">[a-z]+</requirement>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

instead of "attribute" I would name this "placeholder" or "variable". so<requirement placeholder="...">

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think the attribute should be named like thedefault one (ie.name), don't you think so?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think the attribute should have the same name than the one used in XML routing files, for consistency

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Good one, let's rename attributes tokey.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

true, but then i would also need to be host, methods and schemes attributes instead of elements.
seehttps://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.xml

</requirements>
<options>
<option name="compiler_class">Symfony\Component\Routing\RouteCompiler</option>
<option name="opt1">val1</option>
<option name="opt2">val2</option>
</options>
</route>
</route>
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,9 +10,7 @@
<default attribute="name">Joseph</default>
</defaults>
<requirements>
<requirement attribute="compiler_class">Symfony\Component\Routing\RouteCompiler</requirement>
<requirement attribute="opt1">val1</requirement>
<requirement attribute="opt2">val2</requirement>
<requirement attribute="name">[a-z]+</requirement>
</requirements>
<options>
<option name="compiler_class">Symfony\Component\Routing\RouteCompiler</option>
Expand All@@ -32,4 +30,4 @@
<option name="opt2">val2</option>
</options>
</route>
</routes>
</routes>

[8]ページ先頭

©2009-2025 Movatter.jp