Skip to content

Commit

Permalink
merged branch francisbesset/routing_constant_usage (PR #6449)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Commits
-------

18daa10 [Routing] Used static to call constant in XmlFileLoader

Discussion
----------

[2.2][Routing] Used static to call constant in XmlFileLoader

It is more complicated to override XmlFileLoader if contants are called with `self`.
This PR replace `self` to `static`.

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

---------------------------------------------------------------------------

by piotrpasich at 2012-12-21T08:17:14Z

+1
  • Loading branch information
fabpot committed Dec 27, 2012
2 parents 35f5bca + 18daa10 commit c0e341c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Routing/Loader/XmlFileLoader.php
Expand Up @@ -76,7 +76,7 @@ public function load($file, $type = null)
*/
protected function parseNode(RouteCollection $collection, \DOMElement $node, $path, $file)
{
if (self::NAMESPACE_URI !== $node->namespaceURI) {
if (static::NAMESPACE_URI !== $node->namespaceURI) {
return;
}

Expand Down Expand Up @@ -192,7 +192,7 @@ private function parseConfigs(\DOMElement $node, $path)
$requirements = array();
$options = array();

foreach ($node->getElementsByTagNameNS(self::NAMESPACE_URI, '*') as $n) {
foreach ($node->getElementsByTagNameNS(static::NAMESPACE_URI, '*') as $n) {
switch ($n->localName) {
case 'default':
$defaults[$n->getAttribute('key')] = trim($n->textContent);
Expand Down

0 comments on commit c0e341c

Please sign in to comment.