class UrlScript extends UrlImmutable

Immutable representation of a URL with application base-path.

     baseUrl    basePath  relativePath  relativeUrl
        |          |        |               |
/---------------/-----\/--------\-----------------------------\
http://nette.org/admin/script.php/pathinfo/?name=param#fragment
                \_______________/\________/
                       |              |
                  scriptPath       pathInfo

Properties

string read-only $scriptPath
string read-only $basePath
string read-only $relativePath
string read-only $baseUrl
string read-only $relativeUrl
string read-only $pathInfo

Methods

__construct(Url $url = '/', string $scriptPath = '')

No description

withPath(string $path, string $scriptPath = '')

No description

string
getScriptPath()

No description

string
getBasePath()

No description

string
getRelativePath()

No description

string
getBaseUrl()

No description

string
getRelativeUrl()

No description

string
getPathInfo()

Returns the path segment after the script name (PATH_INFO), or an empty string if not present.

string
mergePath(string $path)

No description

Details

at line 40
__construct(Url $url = '/', string $scriptPath = '')

No description

Parameters

Url $url
string $scriptPath

Exceptions

InvalidArgumentException

at line 47
UrlImmutable withPath(string $path, string $scriptPath = '')

No description

Parameters

string $path
string $scriptPath

Return Value

UrlImmutable

at line 69
string getScriptPath()

No description

Return Value

string

at line 75
string getBasePath()

No description

Return Value

string

at line 81
string getRelativePath()

No description

Return Value

string

at line 87
string getBaseUrl()

No description

Return Value

string

at line 93
string getRelativeUrl()

No description

Return Value

string

at line 102
string getPathInfo()

Returns the path segment after the script name (PATH_INFO), or an empty string if not present.

Return Value

string

at line 109
protected string mergePath(string $path)

internal  
 

No description

Parameters

string $path

Return Value

string