original_string: public static function getRequestParameterValue(Request $request, $path)
      {
          if (false === $pos = strpos($path, '[')) {
              return $request->get($path);
          }
  
          $root = substr($path, 0, $pos);
  
          if (null === $value = $request->get($root)) {
              return;
          }
  
          if (null === self::$propertyAccessor) {
              self::$propertyAccessor = PropertyAccess::createPropertyAccessor();
          }
  
          try {
              return self::$propertyAccessor->getValue($value, substr($path, $pos));
          } catch (AccessException $e) {
              return;
          }
      }
code: public static function getRequestParameterValue(Request $request, $path)
      {
          if (false === $pos = strpos($path, '[')) {
              return $request->get($path);
          }
  
          $root = substr($path, 0, $pos);
  
          if (null === $value = $request->get($root)) {
              return;
          }
  
          if (null === self::$propertyAccessor) {
              self::$propertyAccessor = PropertyAccess::createPropertyAccessor();
          }
  
          try {
              return self::$propertyAccessor->getValue($value, substr($path, $pos));
          } catch (AccessException $e) {
              return;
          }
      }
code_tokens: public static function getRequestParameterValue ( Request $ request , $ path ) { if ( false === $ pos = strpos ( $ path , '[' ) ) { return $ request -> get ( $ path ) ; } $ root = substr ( $ path , 0 , $ pos ) ; if ( null === $ value = $ request -> get ( $ root ) ) { return ; } if ( null === self :: $ propertyAccessor ) { self :: $ propertyAccessor = PropertyAccess :: createPropertyAccessor ( ) ; } try { return self :: $ propertyAccessor -> getValue ( $ value , substr ( $ path , $ pos ) ) ; } catch ( AccessException $ e ) { return ; } }
docstring: Returns a request "parameter" value.
  
  Paths like foo[bar] will be evaluated to find deeper items in nested data structures.
  
  @param Request $request The request
  @param string  $path    The key
  
  @return mixed
  
  @throws InvalidArgumentException when the given path is malformed
docstring_tokens: Returns a request parameter value .