PHP 클래스 Faker\Provider\Text

상속: extends Faker\Provider\Base
파일 보기 프로젝트 열기: fzaninotto/faker 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$baseText
$consecutiveWords
$explodedText
$separator
$separatorLen
$textStartsWithUppercase

공개 메소드들

메소드 설명
realText ( integer $maxNbChars = 200, integer $indexSize = 2 ) : string Generate a text string by the Markov chain algorithm.

보호된 메소드들

메소드 설명
appendEnd ( $text )
explode ( $text )
getConsecutiveWords ( $indexSize )
getExplodedText ( )
implode ( $words )
strlen ( $text )
validStart ( $word )

메소드 상세

appendEnd() 보호된 정적인 메소드

protected static appendEnd ( $text )

explode() 보호된 정적인 메소드

protected static explode ( $text )

getConsecutiveWords() 보호된 메소드

protected getConsecutiveWords ( $indexSize )

getExplodedText() 보호된 메소드

protected getExplodedText ( )

implode() 보호된 정적인 메소드

protected static implode ( $words )

realText() 공개 메소드

Depending on the $maxNbChars, returns a random valid looking text. The algorithm generates a weighted table with the specified number of words as the index and the possible following words as the value.
public realText ( integer $maxNbChars = 200, integer $indexSize = 2 ) : string
$maxNbChars integer Maximum number of characters the text should contain (minimum: 10)
$indexSize integer Determines how many words are considered for the generation of the next word. The minimum is 1, and it produces the higher level of randomness, although the generated text usually doesn't make sense. Higher index sizes (up to 5) produce more correct text, at the price of less randomness.
리턴 string

strlen() 보호된 정적인 메소드

protected static strlen ( $text )

validStart() 보호된 정적인 메소드

protected static validStart ( $word )

프로퍼티 상세

$baseText 보호되어 있는 정적으로 프로퍼티

protected static $baseText

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

protected $consecutiveWords

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

protected $explodedText

$separator 보호되어 있는 정적으로 프로퍼티

protected static $separator

$separatorLen 보호되어 있는 정적으로 프로퍼티

protected static $separatorLen

$textStartsWithUppercase 보호되어 있는 정적으로 프로퍼티

protected static $textStartsWithUppercase