path_helper
class path_helper
A class with various functions that are related to paths, files and the filesystem
Properties
protected symfony_request | $symfony_request | ||
protected filesystem_interface | $filesystem | ||
protected request_interface | $request | ||
protected string | $phpbb_root_path | ||
protected string | $adm_relative_path | ||
protected string | $php_ext | ||
protected string | $web_root_path | ||
protected bool | $in_adm_path |
Methods
Constructor
Get the phpBB root path
Get the adm root path
Get the php extension
Update a web path to the correct relative root path
Strips away the web root path and prepends the normal root path
Get a relative root path from the current URL
Get the web root path of the referer form an ajax request
Eliminates useless . and .. components from specified URL
Glue URL parameters together
Get the base and parameters of a URL
Strip parameters from an already built URL.
Append parameters to an already built URL.
Get a valid page
Tells if the router is currently in use (if the current page is a route or not)
Details
at line 55
__construct(symfony_request $symfony_request, filesystem_interface $filesystem, request_interface $request, string $phpbb_root_path, string $php_ext, mixed $adm_relative_path = null)
Constructor
at line 70
string
get_phpbb_root_path()
Get the phpBB root path
at line 80
string
get_adm_relative_path()
Get the adm root path
at line 90
string
get_php_ext()
Get the php extension
at line 104
string
update_web_root_path(string $path)
Update a web path to the correct relative root path
This replaces $phpbb_root_path . some_url with get_web_root_path() . some_url
at line 144
string
remove_web_root_path(string $path)
Strips away the web root path and prepends the normal root path
This replaces get_web_root_path() . some_url with $phpbb_root_path . some_url
at line 161
string
get_web_root_path()
Get a relative root path from the current URL
at line 265
string
get_web_root_path_from_ajax_referer(string $absolute_referer_url, string $absolute_board_url)
Get the web root path of the referer form an ajax request
at line 330
string
clean_url(string $url)
Eliminates useless . and .. components from specified URL
at line 352
string
glue_url_params(array $params)
Glue URL parameters together
at line 378
array
get_url_parts(string $url, bool $is_amp = true)
Get the base and parameters of a URL
at line 434
string
strip_url_params(string $url, array|string $strip, bool $is_amp = true)
Strip parameters from an already built URL.
at line 464
string
append_url_params(string $url, array $new_params, bool $is_amp = true)
Append parameters to an already built URL.
at line 488
string
get_valid_page(string $page, bool $mod_rewrite = false)
Get a valid page
at line 519
bool
is_router_used()
Tells if the router is currently in use (if the current page is a route or not)