PHP 클래스 Purl\Url

저자: Jonathan H. Wage ([email protected])
상속: extends purl\AbstractPart
파일 보기 프로젝트 열기: jwage/purl 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$data array
$partClassMap array

공개 메소드들

메소드 설명
__construct ( string $url = null, purl\ParserInterface $parser = null ) Construct a new Url instance.
__toString ( )
extract ( string $string ) : array Extracts urls from a string of text.
fromCurrent ( ) : Url Creates an Url instance based on data available on $_SERVER variable.
getFragment ( ) : purl\Fragment Get the Fragment instance.
getNetloc ( ) : string Gets the netloc part of the Url. It is the user, pass, host and port returned as a string.
getParser ( ) : purl\ParserInterface Gets the ParserInterface instance used to parse this Url instance.
getPath ( ) : purl\Path Get the Path instance.
getQuery ( ) : Query Get the Query instance.
getUrl ( ) : string Builds a string url from this Url instance internal data and returns it.
isAbsolute ( ) : boolean Checks if the Url instance is absolute or not.
join ( Url | string $url ) : Url Join this Url instance together with another Url instance or a string url.
parse ( string $url ) : Url Static convenience method for creating a new Url instance.
set ( $key, $value )
setFragment ( purl\Fragment $fragment ) Set the Fragment instance.
setParser ( purl\ParserInterface $parser ) Sets the ParserInterface instance to use to parse this Url instance.
setPath ( purl\Path $path ) Set the Path instance.
setQuery ( Query $query ) Set the Query instance.
setUrl ( $url ) Set the string url for this Url instance and sets initialized to false.

보호된 메소드들

메소드 설명
doInitialize ( )

비공개 메소드들

메소드 설명
createDefaultParser ( ) : Parser Creates the default Parser instance to parse urls.
httpBuildRelativeUrl ( array $parts ) : string Reconstructs relative part of URL from an array of parts.
httpBuildUrl ( array $parts ) : string Reconstructs a string URL from an array of parts.

메소드 상세

__construct() 공개 메소드

Construct a new Url instance.
public __construct ( string $url = null, purl\ParserInterface $parser = null )
$url string
$parser purl\ParserInterface

__toString() 공개 메소드

public __toString ( )

doInitialize() 보호된 메소드

protected doInitialize ( )

extract() 공개 정적인 메소드

Extracts urls from a string of text.
public static extract ( string $string ) : array
$string string
리턴 array $urls

fromCurrent() 공개 정적인 메소드

Creates an Url instance based on data available on $_SERVER variable.
public static fromCurrent ( ) : Url
리턴 Url

getFragment() 공개 메소드

Get the Fragment instance.
public getFragment ( ) : purl\Fragment
리턴 purl\Fragment

getNetloc() 공개 메소드

Gets the netloc part of the Url. It is the user, pass, host and port returned as a string.
public getNetloc ( ) : string
리턴 string

getParser() 공개 메소드

Gets the ParserInterface instance used to parse this Url instance.
public getParser ( ) : purl\ParserInterface
리턴 purl\ParserInterface

getPath() 공개 메소드

Get the Path instance.
public getPath ( ) : purl\Path
리턴 purl\Path

getQuery() 공개 메소드

Get the Query instance.
public getQuery ( ) : Query
리턴 Query

getUrl() 공개 메소드

Builds a string url from this Url instance internal data and returns it.
public getUrl ( ) : string
리턴 string

isAbsolute() 공개 메소드

Checks if the Url instance is absolute or not.
public isAbsolute ( ) : boolean
리턴 boolean

join() 공개 메소드

Join this Url instance together with another Url instance or a string url.
public join ( Url | string $url ) : Url
$url Url | string
리턴 Url

parse() 공개 정적인 메소드

Static convenience method for creating a new Url instance.
public static parse ( string $url ) : Url
$url string
리턴 Url

set() 공개 메소드

public set ( $key, $value )

setFragment() 공개 메소드

Set the Fragment instance.
public setFragment ( purl\Fragment $fragment )
$fragment purl\Fragment

setParser() 공개 메소드

Sets the ParserInterface instance to use to parse this Url instance.
public setParser ( purl\ParserInterface $parser )
$parser purl\ParserInterface

setPath() 공개 메소드

Set the Path instance.
public setPath ( purl\Path $path )
$path purl\Path

setQuery() 공개 메소드

Set the Query instance.
public setQuery ( Query $query )
$query Query

setUrl() 공개 메소드

Set the string url for this Url instance and sets initialized to false.
public setUrl ( $url )

프로퍼티 상세

$data 보호되어 있는 프로퍼티

protected array $data
리턴 array

$partClassMap 보호되어 있는 프로퍼티

protected array $partClassMap
리턴 array