PHP Class Spatie\Crawler\Url

Afficher le fichier Open project: spatie/crawler Class Usage Examples

Méthodes publiques

Свойство Type Description
$host null | string
$path null | string
$port integer
$query null | string
$scheme null | string

Méthodes publiques

Méthode Description
__construct ( $url ) Url constructor.
__construct ( string $url )
__toString ( ) : string
create ( $url ) : static
create ( string $url ) : static
hasCrawlableScheme ( ) : boolean
isEmailUrl ( ) : boolean Determine if this is a mailto-link.
isEqual ( Url $otherUrl ) : boolean
isJavascript ( ) : boolean Determine if this is an inline javascript.
isProtocolIndependent ( ) : boolean
isRelative ( ) : boolean
isTelUrl ( ) : boolean Determine if this is a tel-link.
path ( ) : null | string
removeFragment ( )
segment ( integer $index ) : string | null
segments ( integer $index = null ) : array | null | string
segments ( integer | null $index = null ) : array | null | string
setHost ( string $host )
setPort ( integer $port )
setScheme ( string $scheme )
startsWith ( string | null $haystack, string | array $needles ) : boolean

Method Details

__construct() public méthode

Url constructor.
public __construct ( $url )
$url

__construct() public méthode

public __construct ( string $url )
$url string

__toString() public méthode

public __toString ( ) : string
Résultat string

create() public static méthode

public static create ( $url ) : static
$url
Résultat static

create() public static méthode

public static create ( string $url ) : static
$url string
Résultat static

hasCrawlableScheme() public méthode

public hasCrawlableScheme ( ) : boolean
Résultat boolean

isEmailUrl() public méthode

Determine if this is a mailto-link.
public isEmailUrl ( ) : boolean
Résultat boolean

isEqual() public méthode

public isEqual ( Url $otherUrl ) : boolean
$otherUrl Url
Résultat boolean

isJavascript() public méthode

Determine if this is an inline javascript.
public isJavascript ( ) : boolean
Résultat boolean

isProtocolIndependent() public méthode

public isProtocolIndependent ( ) : boolean
Résultat boolean

isRelative() public méthode

public isRelative ( ) : boolean
Résultat boolean

isTelUrl() public méthode

Determine if this is a tel-link.
public isTelUrl ( ) : boolean
Résultat boolean

path() public méthode

public path ( ) : null | string
Résultat null | string

removeFragment() public méthode

public removeFragment ( )

segment() public méthode

public segment ( integer $index ) : string | null
$index integer
Résultat string | null

segments() public méthode

public segments ( integer $index = null ) : array | null | string
$index integer
Résultat array | null | string

segments() public méthode

public segments ( integer | null $index = null ) : array | null | string
$index integer | null
Résultat array | null | string

setHost() public méthode

public setHost ( string $host )
$host string

setPort() public méthode

public setPort ( integer $port )
$port integer

setScheme() public méthode

public setScheme ( string $scheme )
$scheme string

startsWith() public méthode

public startsWith ( string | null $haystack, string | array $needles ) : boolean
$haystack string | null
$needles string | array
Résultat boolean

Property Details

$host public_oe property

public null|string $host
Résultat null | string

$path public_oe property

public null|string $path
Résultat null | string

$port public_oe property

public int $port
Résultat integer

$query public_oe property

public null|string $query
Résultat null | string

$scheme public_oe property

public null|string $scheme
Résultat null | string