\phpDocumentor\Transformer\RouterForFileProxy

Proxies a generated Routing Rule to generate physical filenames.

By default a RoutingRule will generate a relative path on a webserver. This causes issues between operating systems since Linux uses / and Windows \ as a directory separator.

To make sure that the correct file is generated can this proxy be used to generate a filename instead of a webserver path.

Summary

Methods
Properties
Constants
__construct()
generate()
No public properties found
No constants found
No protected methods found
$rule
N/A
No private methods found
No private properties found
N/A

Properties

Methods

__construct()

__construct(\phpDocumentor\Transformer\Router\Rule  $rule) 

Registers the Routing Rule that needs to be translated with this proxy.

Parameters

\phpDocumentor\Transformer\Router\Rule $rule

generate()

generate(string|\phpDocumentor\Descriptor\DescriptorAbstract  $node, string  $directorySeparator = DIRECTORY_SEPARATOR) : string|false

Generates an URL for the given node.

Parameters

string|\phpDocumentor\Descriptor\DescriptorAbstract $node

The node for which to generate an URL.

string $directorySeparator

Which directory separator should be used to generate the paths with, defaults to the default separator for the current O/S.

Returns

string|false —

a well-formed relative or absolute URL, or false if no URL could be generated.