VendorStreamWrapperPathProcessor.php in Vendor Stream Wrapper 8
File
src/PathProcessor/VendorStreamWrapperPathProcessor.php
View source
<?php
namespace Drupal\vendor_stream_wrapper\PathProcessor;
use Drupal\Core\PathProcessor\InboundPathProcessorInterface;
use Symfony\Component\HttpFoundation\Request;
class VendorStreamWrapperPathProcessor implements InboundPathProcessorInterface {
public function processInbound($path, Request $request) {
if (strpos($path, '/vendor_files/') === 0) {
$names = preg_replace('|^\\/vendor_files\\/|', '', $path);
$names = str_replace('/', ':', $names);
return "/vendor_files/{$names}";
}
return $path;
}
}