Retrieve the first element of the URL path.
public static getFirstPathElement ( boolean $trailingslash = true ) : string | ||
$trailingslash | boolean | Whether to add a trailing slash to the element or not. Defaults to true. |
return | string | The first element of the URL path, with an optional, trailing slash. |