mecha-cms / mecha

Minimalist content management system.

Home Page:https://mecha-cms.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove `clean` Property from `$url`

taufik-nurrohman opened this issue · comments

And add function arguments to current as options to include/exclude/replace query and hash part from URL.

// For `http://127.0.0.1/foo/bar/1?foo=bar&baz=qux#foo`
echo $url->current; // → `http://127.0.0.1/foo/bar/1?foo=bar&baz=qux#foo`
echo $url->current(); // → `http://127.0.0.1/foo/bar/1?foo=bar&baz=qux#foo`
echo $url->current(query: false); // → `http://127.0.0.1/foo/bar/1#foo`
echo $url->current(query: false, hash: false); // → `http://127.0.0.1/foo/bar/1`
echo $url->current(query: ['baz' => 1]); // → `http://127.0.0.1/foo/bar/1?foo=bar&baz=1#foo`