PHP Class ValueObjects\Web\Url

Inheritance: implements ValueObjects\ValueObjectInterface
Datei anzeigen Open project: nicolopignatelli/valueobjects Class Usage Examples

Protected Properties

Property Type Description
$domain ValueObjects\Web\Domain
$fragmentIdentifier ValueObjects\Web\FragmentIdentifier
$password ValueObjects\StringLiteral\StringLiteral
$path ValueObjects\Web\Path
$port ValueObjects\Web\PortNumber
$queryString ValueObjects\Web\QueryString
$scheme ValueObjects\Web\SchemeName
$user ValueObjects\StringLiteral\StringLiteral

Public Methods

Method Description
__construct ( ValueObjects\Web\SchemeName $scheme, ValueObjects\StringLiteral\StringLiteral $user, ValueObjects\StringLiteral\StringLiteral $password, ValueObjects\Web\Domain $domain, PortNumberInterface $port, ValueObjects\Web\Path $path, ValueObjects\Web\QueryString $query, ValueObjects\Web\FragmentIdentifier $fragment ) Returns a new Url object
__toString ( ) : string Returns a string representation of the url
fromNative ( ) : Url Returns a new Url object from a native url string
getDomain ( ) : ValueObjects\Web\Hostname | ValueObjects\Web\IPAddress Returns the domain of the Url
getFragmentIdentifier ( ) : ValueObjects\Web\FragmentIdentifier Returns the fragment identifier of the Url
getPassword ( ) : ValueObjects\StringLiteral\StringLiteral Returns the password part of the Url
getPath ( ) : ValueObjects\Web\Path Returns the path of the Url
getPort ( ) : PortNumberInterface Returns the port of the Url
getQueryString ( ) : ValueObjects\Web\QueryString Returns the query string of the Url
getScheme ( ) : ValueObjects\Web\SchemeName Returns the scheme of the Url
getUser ( ) : ValueObjects\StringLiteral\StringLiteral Returns the user part of the Url
sameValueAs ( ValueObjects\ValueObjectInterface $url ) : boolean Tells whether two Url are sameValueAs by comparing their components

Method Details

__construct() public method

Returns a new Url object
public __construct ( ValueObjects\Web\SchemeName $scheme, ValueObjects\StringLiteral\StringLiteral $user, ValueObjects\StringLiteral\StringLiteral $password, ValueObjects\Web\Domain $domain, PortNumberInterface $port, ValueObjects\Web\Path $path, ValueObjects\Web\QueryString $query, ValueObjects\Web\FragmentIdentifier $fragment )
$scheme ValueObjects\Web\SchemeName
$user ValueObjects\StringLiteral\StringLiteral
$password ValueObjects\StringLiteral\StringLiteral
$domain ValueObjects\Web\Domain
$port PortNumberInterface
$path ValueObjects\Web\Path
$query ValueObjects\Web\QueryString
$fragment ValueObjects\Web\FragmentIdentifier

__toString() public method

Returns a string representation of the url
public __toString ( ) : string
return string

fromNative() public static method

Returns a new Url object from a native url string
public static fromNative ( ) : Url
return Url

getDomain() public method

Returns the domain of the Url
public getDomain ( ) : ValueObjects\Web\Hostname | ValueObjects\Web\IPAddress
return ValueObjects\Web\Hostname | ValueObjects\Web\IPAddress

getFragmentIdentifier() public method

Returns the fragment identifier of the Url
public getFragmentIdentifier ( ) : ValueObjects\Web\FragmentIdentifier
return ValueObjects\Web\FragmentIdentifier

getPassword() public method

Returns the password part of the Url
public getPassword ( ) : ValueObjects\StringLiteral\StringLiteral
return ValueObjects\StringLiteral\StringLiteral

getPath() public method

Returns the path of the Url
public getPath ( ) : ValueObjects\Web\Path
return ValueObjects\Web\Path

getPort() public method

Returns the port of the Url
public getPort ( ) : PortNumberInterface
return PortNumberInterface

getQueryString() public method

Returns the query string of the Url
public getQueryString ( ) : ValueObjects\Web\QueryString
return ValueObjects\Web\QueryString

getScheme() public method

Returns the scheme of the Url
public getScheme ( ) : ValueObjects\Web\SchemeName
return ValueObjects\Web\SchemeName

getUser() public method

Returns the user part of the Url
public getUser ( ) : ValueObjects\StringLiteral\StringLiteral
return ValueObjects\StringLiteral\StringLiteral

sameValueAs() public method

Tells whether two Url are sameValueAs by comparing their components
public sameValueAs ( ValueObjects\ValueObjectInterface $url ) : boolean
$url ValueObjects\ValueObjectInterface
return boolean

Property Details

$domain protected_oe property

protected Domain,ValueObjects\Web $domain
return ValueObjects\Web\Domain

$fragmentIdentifier protected_oe property

protected FragmentIdentifier,ValueObjects\Web $fragmentIdentifier
return ValueObjects\Web\FragmentIdentifier

$password protected_oe property

protected StringLiteral,ValueObjects\StringLiteral $password
return ValueObjects\StringLiteral\StringLiteral

$path protected_oe property

protected Path,ValueObjects\Web $path
return ValueObjects\Web\Path

$port protected_oe property

protected PortNumber,ValueObjects\Web $port
return ValueObjects\Web\PortNumber

$queryString protected_oe property

protected QueryString,ValueObjects\Web $queryString
return ValueObjects\Web\QueryString

$scheme protected_oe property

protected SchemeName,ValueObjects\Web $scheme
return ValueObjects\Web\SchemeName

$user protected_oe property

protected StringLiteral,ValueObjects\StringLiteral $user
return ValueObjects\StringLiteral\StringLiteral