url(Psr\Http\Message\UriInterface|array|string|null $url = null, bool $full = false): string
Convenience wrapper for Router::url().
Psr\Http\Message\UriInterface|array|string|null
$url
optional
An array specifying any of the following: 'controller', 'action', 'plugin' additionally, you can provide routed elements or query string parameters. If string it can be name any valid url string or it can be an UriInterface instance.
bool
$full
optional
If true, the full base URL will be prepended to the result. Default is false.
string
Cake\Core\Exception\CakeException
urlArray(string $path, array $params = []): array
Returns an array URL from a route path string.
string
$path
Route path.
array
$params
optional
An array specifying any additional parameters.
Can be also any special parameters supported by Router::url()
.
array
Interface for applications that use routing.
Class for generating asset URLs.
Provides features for building routes inside scopes.
Contains a collection of routes.
Parses the request URL into controller, action, and parameters. Uses the connected routes to match the incoming URL string to parameters that will allow the request to be dispatched. Also handles converting parameter lists into URL strings, using the connected routes. Routing allows you to decouple the way the world interacts with your application (URLs) and the implementation (controllers and actions).