Servant

Path getters

endpoint()
$servant->paths()->endpoint("site", "domain")
'/site/'
endpoints()
$servant->paths()->endpoints()
''
endpoints domain()
$servant->paths()->endpoints("domain")
'/'
endpoints server()
$servant->paths()->endpoints("server")
'/var/www/servant/'
endpoints url()
$servant->paths()->endpoints("url")
'http://servantframework.com/'

Internal paths

relative to url()
$servant->paths()->format("foo", "url")
'http://servantframework.com/foo'
relative to server()
$servant->paths()->format("foo", "server")
'/var/www/servant/foo'
relative to domain()
$servant->paths()->format("foo", "domain")
'/foo'
root-relative to url()
$servant->paths()->format("/foo", "url")
'http://servantframework.com/foo'
root-relative to server()
$servant->paths()->format("/foo", "server")
'/var/www/servant/foo'
root-relative to domain()
$servant->paths()->format("/foo", "domain")
'/foo'

Internal absolute paths

to url()
$servant->paths()->format("http://localhost/servant/foo", "url")
'http://localhost/servant/foo'
to domain()
$servant->paths()->format("http://localhost/servant/foo", "domain")
'http://localhost/servant/foo'
to server()
$servant->paths()->format("http://localhost/servant/foo", "server")
'http://localhost/servant/foo'

External paths

to url()
$servant->paths()->format("http://eiskis.net/foo", "url")
'http://eiskis.net/foo'
to domain()
$servant->paths()->format("http://eiskis.net/foo", "domain")
'http://eiskis.net/foo'
to server()
$servant->paths()->format("http://eiskis.net/foo", "server")
'http://eiskis.net/foo'
force external from server to domain()
$servant->paths()->format("http://eiskis.net/foo", "domain", "server")
'/http://eiskis.net/foo'
force external from domain to server()
$servant->paths()->format("http://eiskis.net/foo", "server", "domain")
'/var/www/servant/http://eiskis.net/foo'