phpBB API Documentation
Class

phpbb\template\asset

class asset

Methods

__construct(string $url, path_helper $path_helper, filesystem $filesystem)

Constructor

set_url(string $url)

Set URL

string get_url()

Get URL

boolean is_relative()

Checks if URL is local and relative

string get_path()

Get path component of current URL

set_path(string $path, boolean $urlencode = false)

Set path component

add_assets_version(string $version)

Add assets_version parameter to URL.

Details

at line 33
public __construct(string $url, path_helper $path_helper, filesystem $filesystem)

Constructor

Parameters

string $url URL
path_helper $path_helper Path helper object
filesystem $filesystem

at line 46
public set_url(string $url)

Set URL

Parameters

string $url URL

at line 122
public string get_url()

Get URL

Return Value

string URL

at line 132
public boolean is_relative()

Checks if URL is local and relative

Return Value

boolean True if URL is local and relative

at line 147
public string get_path()

Get path component of current URL

Return Value

string Path

at line 158
public set_path(string $path, boolean $urlencode = false)

Set path component

Parameters

string $path Path component
boolean $urlencode If true, parts of path should be encoded with rawurlencode()

at line 197
public add_assets_version(string $version)

Add assets_version parameter to URL.

Parameter will not be added if assets_version already exists in URL

Parameters

string $version Version