ForFileProxy

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.

package

Default

Methods

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

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

Generates an URL for the given node.

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

Arguments

$node

string|\phpDocumentor\Descriptor\DescriptorAbstract

The node for which to generate an URL.

$directorySeparator

string

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

Response

string|false

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

Properties

Contains the Routing Rule that is wrapped by this proxy

rule : \phpDocumentor\Transformer\Router\Rule
var

Contains the Routing Rule that is wrapped by this proxy

Type(s)

\phpDocumentor\Transformer\Router\Rule