PHP 클래스 url, kirby

파일 보기 프로젝트 열기: bastianallgeier/kirby 1 사용 예제들

공개 메소드들

메소드 설명
current ( ) : string Returns the current URL
has_query ( string $url ) : boolean Checks if the URL has a query string attached
short ( string $url, integer $chars = false, boolean $base = false, string $rep = '…' ) : string Shortens an URL It removes http:// or https:// and uses str::short afterwards
strip_hash ( string $url ) : string Strips a hash value from the URL
strip_query ( string $url ) : string Strips the query from the URL
valid ( string $url ) : boolean Checks for a valid URL

메소드 상세

current() 정적인 공개 메소드

Returns the current URL
static public current ( ) : string
리턴 string

has_query() 정적인 공개 메소드

Checks if the URL has a query string attached
static public has_query ( string $url ) : boolean
$url string
리턴 boolean

short() 정적인 공개 메소드

Shortens an URL It removes http:// or https:// and uses str::short afterwards
static public short ( string $url, integer $chars = false, boolean $base = false, string $rep = '…' ) : string
$url string The URL to be shortened
$chars integer The final number of characters the URL should have
$base boolean True: only take the base of the URL.
$rep string The element, which should be added if the string is too long. Ellipsis is the default.
리턴 string The shortened URL

strip_hash() 정적인 공개 메소드

Strips a hash value from the URL
static public strip_hash ( string $url ) : string
$url string
리턴 string

strip_query() 정적인 공개 메소드

Strips the query from the URL
static public strip_query ( string $url ) : string
$url string
리턴 string

valid() 정적인 공개 메소드

Checks for a valid URL
static public valid ( string $url ) : boolean
$url string
리턴 boolean