PHP 클래스 Yosymfony\Spress\Core\Support\StringWrapper

Based on https://github.com/laravel/framework/blob/5.0/src/Illuminate/Support/Arr.php and https://github.com/danielstjules/Stringy/blob/master/src/Stringy.php
저자: Victor Puertas ([email protected])
파일 보기 프로젝트 열기: spress/spress 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$chars
$str

공개 메소드들

메소드 설명
__construct ( string $str = '' ) Constructor.
__toString ( ) : string Returns the string wrapped.
deletePrefix ( string $prefix ) : string Deletes a prefix of the string.
deleteSufix ( string $sufix ) : string Deletes a sufix of the string.
endWith ( string $value ) : boolean Determine if a the string ends with a given substring.
getFirstEndMatch ( array $strings ) : string Gets the first element of the argument matching with the ends of the string.
lower ( ) : string Convert the given string to lower-case.
setString ( string $str ) : Yosymfony\Spress\Core\Support Sets the string.
slug ( string $separator = '-' ) : string Generate a URL friendly "slug".
startWith ( string $value ) : boolean Determine if a the string starts with a given substring.
toAscii ( boolean $removeUnsupported = true ) : string Transliterate a UTF-8 value to ASCII.
upper ( ) : string Convert the given string to upper-case.

보호된 메소드들

메소드 설명
getChars ( ) : array Gets the conversion table.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $str = '' )
$str string The string

__toString() 공개 메소드

Returns the string wrapped.
public __toString ( ) : string
리턴 string The current value of the wrapper

deletePrefix() 공개 메소드

Deletes a prefix of the string.
public deletePrefix ( string $prefix ) : string
$prefix string The prefix
리턴 string The string without prefix

deleteSufix() 공개 메소드

Deletes a sufix of the string.
public deleteSufix ( string $sufix ) : string
$sufix string The sufix
리턴 string The string without sufix

endWith() 공개 메소드

Determine if a the string ends with a given substring.
public endWith ( string $value ) : boolean
$value string
리턴 boolean

getChars() 보호된 메소드

Gets the conversion table.
protected getChars ( ) : array
리턴 array

getFirstEndMatch() 공개 메소드

Gets the first element of the argument matching with the ends of the string.
public getFirstEndMatch ( array $strings ) : string
$strings array List of strings
리턴 string The first element or empty string if no matching found

lower() 공개 메소드

Convert the given string to lower-case.
public lower ( ) : string
리턴 string

setString() 공개 메소드

Sets the string.
public setString ( string $str ) : Yosymfony\Spress\Core\Support
$str string The string
리턴 Yosymfony\Spress\Core\Support This instance

slug() 공개 메소드

Generate a URL friendly "slug".
public slug ( string $separator = '-' ) : string
$separator string
리턴 string

startWith() 공개 메소드

Determine if a the string starts with a given substring.
public startWith ( string $value ) : boolean
$value string
리턴 boolean

toAscii() 공개 메소드

Transliterate a UTF-8 value to ASCII.
public toAscii ( boolean $removeUnsupported = true ) : string
$removeUnsupported boolean Whether or not to remove the unsupported characters
리턴 string

upper() 공개 메소드

Convert the given string to upper-case.
public upper ( ) : string
리턴 string

프로퍼티 상세

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

protected $chars

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

protected $str