Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RequestAttributeValueResolver.php

class RequestAttributeValueResolver

Yields a non-variadic argument's value from the request attributes.

@author Iltar van der Berg <kjarli@gmail.com>

Hierarchy

  • class \Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver implements \Symfony\Component\HttpKernel\Controller\ValueResolverInterface

Expanded class hierarchy of RequestAttributeValueResolver

1 file declares its use of RequestAttributeValueResolver
ArgumentResolver.php in vendor/symfony/http-kernel/Controller/ArgumentResolver.php

File

vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php, line 23

Namespace

Symfony\Component\HttpKernel\Controller\ArgumentResolver
View source
final class RequestAttributeValueResolver implements ValueResolverInterface {
    public function resolve(Request $request, ArgumentMetadata $argument) : array {
        return !$argument->isVariadic() && $request->attributes
            ->has($argument->getName()) ? [
            $request->attributes
                ->get($argument->getName()),
        ] : [];
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
RequestAttributeValueResolver::resolve public function Returns the possible value(s). Overrides ValueResolverInterface::resolve

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal