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 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 53
__construct(symfony_request $symfony_request, request_interface $request, string $phpbb_root_path, string $php_ext, mixed $adm_relative_path = null)
Constructor
at line 67
string
get_phpbb_root_path()
Get the phpBB root path
at line 77
string
get_adm_relative_path()
Get the adm root path
at line 87
string
get_php_ext()
Get the php extension
at line 101
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 141
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 158
string
get_web_root_path()
Get a relative root path from the current URL
at line 262
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 327
string
clean_url(string $url)
Eliminates useless . and .. components from specified URL
at line 349
string
glue_url_params(array $params)
Glue URL parameters together
at line 375
array
get_url_parts(string $url, bool $is_amp = true)
Get the base and parameters of a URL
at line 431
string
strip_url_params(string $url, array|string $strip, bool $is_amp = true)
Strip parameters from an already built URL.
at line 461
string
append_url_params(string $url, array $new_params, bool $is_amp = true)
Append parameters to an already built URL.
at line 485
string
get_valid_page(string $page, bool $mod_rewrite = false)
Get a valid page
at line 516
bool
is_router_used()
Tells if the router is currently in use (if the current page is a route or not)