ehough / curly
This package is abandoned and no longer maintained.
No replacement package was suggested.
Powerful PHP class for working with URLs
1.0.3
2013-04-04 19:52 UTC
Requires
- php: >=5.2.0
This package is not auto-updated.
Last update: 2020-01-24 15:00:00 UTC
README
This library is no longer maintained. Powerful class for working with URLs. Requires PHP 5.2+.
- Adheres as closely as possible to RFC 3986
- Fully IPv6 ready
foo://username:password@example.com:8042/over/there?name=ferret#nose \_/ \________________________________/\_________/ \_________/ \__/ | | | | | scheme authority path query fragment
Sample Usage
$url = new ehough_curly_Url('foo://username:password@example.com:8042/over/there?name=ferret#nose'); $url->getAuthority(); // username@example.com:8042 $url->getFragment(); // nose $url->getHost(); // example.com $url->getPath(); // /over/there $url->getPort(); // 8042 $url->getQuery(); // name=ferret $url->getQueryVariables(); // array('name' => 'ferret'); $url->getScheme(); // foo $url->getUser(); // username $url->setFragment('ear'); $url->setHost('ehough.com'); $url->setPath('/paved/walkway'); $url->setPort(99); $url->setQueryVariables(array('moon' => 'rise', 'sun' => 'set')); $url->setScheme('teleport'); $url->setUser('melissa:salsa'); echo $url->toString(); // teleport://melissa:salsa@ehough.com:99/paved/walkway?moon=rise&sun=set#ear