PHP 클래스 ReplaceTokens, symfony-1.4

Example:
;
  
Or:

  
  
  
또한 보기: BaseParamFilterReader
저자: hans lellelid, [email protected]
상속: extends BaseParamFilterReader, implements ChainableReader
파일 보기 프로젝트 열기: vjousse/symfony-1.4 1 사용 예제들

공개 메소드들

메소드 설명
chain ( Reader $reader ) : object Creates a new ReplaceTokens using the passed in Reader for instantiation.
createToken ( ) : object Adds a token element to the map of tokens to replace.
createTokensource ( ) : object Adds a token source to the sources of this filter.
getBeginToken ( ) : string Returns the "begin token" character.
getEndToken ( ) : the Returns the "end token" character.
getTokens ( ) : array Returns the map of tokens which will be replaced.
getTokensources ( ) : array Returns the token sources used by this filter; used by ReplaceTokens::chain()
read ( $len = null ) : mixed Returns stream with tokens having been replaced with appropriate values.
setBeginToken ( string $beginToken ) Sets the "begin token" character.
setEndToken ( string $endToken ) Sets the "end token" character.
setTokens ( $tokens ) Sets the map of tokens to replace.
setTokensources ( $sources ) Sets the tokensources to use; used by ReplaceTokens::chain()

비공개 메소드들

메소드 설명
_initialize ( ) Initializes tokens and loads the replacee-replacer hashtable.
replaceTokenCallback ( array $matches ) : string Performs lookup on key and returns appropriate replacement string.

메소드 상세

chain() 공개 메소드

Creates a new ReplaceTokens using the passed in Reader for instantiation.
public chain ( Reader $reader ) : object
$reader Reader
리턴 object A new filter based on this configuration, but filtering the specified reader

createToken() 공개 메소드

Adds a token element to the map of tokens to replace.
public createToken ( ) : object
리턴 object The token added to the map of replacements. Must not be null.

createTokensource() 공개 메소드

Adds a token source to the sources of this filter.
public createTokensource ( ) : object
리턴 object A Reference to the source just added.

getBeginToken() 공개 메소드

Returns the "begin token" character.
public getBeginToken ( ) : string
리턴 string The character used to denote the beginning of a token.

getEndToken() 공개 메소드

Returns the "end token" character.
public getEndToken ( ) : the
리턴 the character used to denote the beginning of a token

getTokens() 공개 메소드

; used by ReplaceTokens::chain()
public getTokens ( ) : array
리턴 array A map (String->String) of token keys to replacement values.

getTokensources() 공개 메소드

Returns the token sources used by this filter; used by ReplaceTokens::chain()
public getTokensources ( ) : array
리턴 array

read() 공개 메소드

If a replacement value is not found for a token, the token is left in the stream.
public read ( $len = null ) : mixed
리턴 mixed filtered stream, -1 on EOF.

setBeginToken() 공개 메소드

Sets the "begin token" character.
public setBeginToken ( string $beginToken )
$beginToken string the character used to denote the beginning of a token.

setEndToken() 공개 메소드

Sets the "end token" character.
public setEndToken ( string $endToken )
$endToken string the character used to denote the end of a token

setTokens() 공개 메소드

; used by ReplaceTokens::chain()
public setTokens ( $tokens )

setTokensources() 공개 메소드

Sets the tokensources to use; used by ReplaceTokens::chain()
public setTokensources ( $sources )