Documentation

PathPackage extends Package
in package

Package that adds a base path to asset URLs in addition to a version.

In addition to the provided base path, this package also automatically prepends the current request base path if a Context is available to allow a website to be hosted easily under any given path under the Web Server root directory.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

Properties

$basePath  : string
$context  : mixed
$versionStrategy  : mixed

Methods

__construct()  : mixed
getBasePath()  : string
Returns the base path.
getUrl()  : string
Returns an absolute or root-relative public path.
getVersion()  : string
Returns the asset version for an asset.
getContext()  : ContextInterface
getVersionStrategy()  : VersionStrategyInterface
isAbsoluteUrl()  : bool

Properties

$versionStrategy

private mixed $versionStrategy

Methods

getBasePath()

Returns the base path.

public getBasePath() : string
Return values
string

getUrl()

Returns an absolute or root-relative public path.

public getUrl(string $path) : string
Parameters
$path : string
Return values
string

getVersion()

Returns the asset version for an asset.

public getVersion(string $path) : string
Parameters
$path : string
Return values
string

isAbsoluteUrl()

protected isAbsoluteUrl(string $url) : bool
Parameters
$url : string
Return values
bool

        
On this page

Search results