class VendorStreamWrapperPathProcessor in Vendor Stream Wrapper 8
Path Processor for the Vendor Stream Wrapper module.
Hierarchy
- class \Drupal\vendor_stream_wrapper\PathProcessor\VendorStreamWrapperPathProcessor implements InboundPathProcessorInterface
Expanded class hierarchy of VendorStreamWrapperPathProcessor
1 string reference to 'VendorStreamWrapperPathProcessor'
1 service uses VendorStreamWrapperPathProcessor
File
- src/
PathProcessor/ VendorStreamWrapperPathProcessor.php, line 11
Namespace
Drupal\vendor_stream_wrapper\PathProcessorView source
class VendorStreamWrapperPathProcessor implements InboundPathProcessorInterface {
/**
* {@inheritdoc}
*/
public function processInbound($path, Request $request) {
// Only act on paths that start with /vendor_files/.
if (strpos($path, '/vendor_files/') === 0) {
$names = preg_replace('|^\\/vendor_files\\/|', '', $path);
$names = str_replace('/', ':', $names);
return "/vendor_files/{$names}";
}
return $path;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
VendorStreamWrapperPathProcessor:: |
public | function |
Processes the inbound path. Overrides InboundPathProcessorInterface:: |