URL::__get()

Proxy for missing properties.

Table of Contents
  1. Description
  2. Example

Description

URL::__get(string $key): mixed;

This method will be called when a public property is not available on class URL. By default, this method will first try to find an existing public method and call it with empty argument.

Example

$url = new URL('http://127.0.0.1');

$asdf = $url->asdf; // Returns `null` because property `asdf` does not exist
$query = $url->query; // Returns `$url->query()` because method `query()` does exist

URL::__get()

Proxy for missing properties.

URL::current()

Returns the full URL address along with its query and hash.