Mecha CMS

Extract current URL data.

URL{::,->}path()

Return the URL path.

2.2.0static
URL::path(void);
URL::path(string $separator = '/');
URL::path(string $separator = '/', array $p = []);
$u_r_l->path(void);
$u_r_l->path(string $separator = '/');
$u_r_l->path(string $separator = '/', array $p = []);

Example:

$A = $url->path;
$B = $url->path();
$C = $url->path('\\');
$D = $url->path('\\', [1 => '#']);

Result:

$A = 'foo/bar/baz';
$B = 'foo/bar/baz';
$C = 'foo\bar\baz';
$D = 'foo\bar\baz';