7 declare(strict_types=1);
21 private $serviceConfig;
26 private $pathProcessor;
38 $this->serviceConfig = $serviceConfig;
39 $this->pathProcessor = $pathProcessor;
52 if ($routeCustomizations) {
53 $originPath =
$request->getPathInfo();
54 $requestMethod =
$request->getMethod();
55 $routePath = ltrim($this->pathProcessor->process($originPath),
'/');
56 if (array_key_exists($routePath, $routeCustomizations)) {
57 if (isset($routeCustomizations[$routePath][$requestMethod])) {
58 $path = ltrim($routeCustomizations[$routePath][$requestMethod],
'/');
59 $request->setPathInfo(str_replace($routePath,
$path, $originPath));
__construct(ServiceConfig $serviceConfig, PathProcessor $pathProcessor)
beforeDispatch(\Magento\Webapi\Controller\Rest $subject, RequestInterface $request)