make_url
- Ariadne >
- Library >
- Ariadne 2.2 >
- Manuals >
- Programmers Reference >
- Classes >
- Object >
- PINP Methods >
(string) make_url($path="", $nls="", $session=true, $https=NULL)
Using the nearest psite parent with a URL as a starting point, returns a URL to the given path.
| Argument | Description |
|---|---|
| (string) $path | The path to translate into an absolute path. |
| (string) $nls | The language code to use in the URL, or
false. |
| (bool) $session | Whether or not to include a session string, if available. |
| (bool) $https | Generate a https:// url
(true) or a http:// url
(false). |
make_url() is a utility function used to create valid url's for
objects. It uses the URL in the nearest parent psite as the
starting point, and adds the path to the given object from that point. If there
is no psite as parent, it will use the url set in the main ariadne
configuration.
make_url() uses make_path()
to parse the path argument, so it understands relative and absolute paths and
will parse '..', '.' and doubled slashes
'//
' correctly.

