You are here

class PathProcessorDecode in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/PathProcessor/PathProcessorDecode.php \Drupal\Core\PathProcessor\PathProcessorDecode

Processes the inbound path by urldecoding it.

Parameters in the URL sometimes represent code-meaningful strings. It is therefore useful to always urldecode() those values so that individual controllers need not concern themselves with it. This is Drupal-specific logic and may not be familiar for developers used to other Symfony-family projects.

@todo Revisit whether or not this logic is appropriate for here or if controllers should be required to implement this logic themselves. If we decide to keep this code, remove this TODO.

Hierarchy

Expanded class hierarchy of PathProcessorDecode

1 file declares its use of PathProcessorDecode
PathProcessorTest.php in core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php
Contains \Drupal\Tests\Core\PathProcessor\PathProcessorTest.
1 string reference to 'PathProcessorDecode'
core.services.yml in core/core.services.yml
core/core.services.yml
1 service uses PathProcessorDecode
path_processor_decode in core/core.services.yml
Drupal\Core\PathProcessor\PathProcessorDecode

File

core/lib/Drupal/Core/PathProcessor/PathProcessorDecode.php, line 25
Contains \Drupal\Core\PathProcessor\PathProcessorDecode.

Namespace

Drupal\Core\PathProcessor
View source
class PathProcessorDecode implements InboundPathProcessorInterface {

  /**
   * {@inheritdoc}
   */
  public function processInbound($path, Request $request) {
    return urldecode($path);
  }

}

Members