Documentation

AssetProxy
in package

Table of Contents

DENIED_EXTENSIONS  = ["php", "phtml", "ini"]
Extensions that are never served, whatever mount they resolve in.
$mounts  : array<string|int, mixed>
__construct()  : mixed
registerWebRootSource()  : void
This function registers a directory on disk as a source of assets to be served by the proxy.
serve()  : void

Constants

DENIED_EXTENSIONS

Extensions that are never served, whatever mount they resolve in.

private mixed DENIED_EXTENSIONS = ["php", "phtml", "ini"]

Properties

$mounts

private array<string|int, mixed> $mounts = []

Methods

__construct()

public __construct() : mixed
Return values
mixed —

registerWebRootSource()

This function registers a directory on disk as a source of assets to be served by the proxy.

public registerWebRootSource(string $sourceRoot[, string $urlPrefix = '' ]) : void

This does not immediately check the filesystem; a missing directory only means requests for its assets end in a 404. The sourceRoot should be an absolute path. The first registered mount that has the file wins.

Parameters
$sourceRoot : string
$urlPrefix : string = ''

Optional URL path prefix the mount is scoped to; empty serves from the URL root.

Return values
void —

serve()

public serve(string $assetPath) : void
Parameters
$assetPath : string
Return values
void —

Search results