class Generator

Properties

string $name string$name
string $firstName string$firstName
string $firstNameMale string$firstNameMale
string $firstNameFemale string$firstNameFemale
string $lastName string$lastName
string $title string$title
string $titleMale string$titleMale
string $titleFemale string$titleFemale
string $citySuffix string$citySuffix
string $streetSuffix string$streetSuffix
string $buildingNumber string$buildingNumber
string $city string$city
string $streetName string$streetName
string $streetAddress string$streetAddress
string $postcode string$postcode
string $address string$address
string $country string$country
float $latitude float$latitude
float $longitude float$longitude
string $ean13 string$ean13
string $ean8 string$ean8
string $isbn13 string$isbn13
string $isbn10 string$isbn10
string $phoneNumber string$phoneNumber
string $company string$company
string $companySuffix string$companySuffix
string $jobTitle string$jobTitle
string $creditCardType string$creditCardType
string $creditCardNumber string$creditCardNumber
DateTime $creditCardExpirationDate \DateTime$creditCardExpirationDate
string $creditCardExpirationDateString string$creditCardExpirationDateString
array $creditCardDetails array$creditCardDetails
string $bankAccountNumber string$bankAccountNumber
string $swiftBicNumber string$swiftBicNumber
string $vat string$vat
string $word string$word
string|array $words string|array$words
string $sentence string$sentence
string|array $sentences string|array$sentences
string $paragraph string$paragraph
string|array $paragraphs string|array$paragraphs
string $text string$text
string $email string$email
string $safeEmail string$safeEmail
string $freeEmail string$freeEmail
string $companyEmail string$companyEmail
string $freeEmailDomain string$freeEmailDomain
string $safeEmailDomain string$safeEmailDomain
string $userName string$userName
string $password string$password
string $domainName string$domainName
string $domainWord string$domainWord
string $tld string$tld
string $url string$url
string $slug string$slug
string $ipv4 string$ipv4
string $ipv6 string$ipv6
string $localIpv4 string$localIpv4
string $macAddress string$macAddress
int $unixTime int$unixTime
DateTime $dateTime \DateTime$dateTime
DateTime $dateTimeAD \DateTime$dateTimeAD
string $iso8601 string$iso8601
DateTime $dateTimeThisCentury \DateTime$dateTimeThisCentury
DateTime $dateTimeThisDecade \DateTime$dateTimeThisDecade
DateTime $dateTimeThisYear \DateTime$dateTimeThisYear
DateTime $dateTimeThisMonth \DateTime$dateTimeThisMonth
string $amPm string$amPm
int $dayOfMonth int$dayOfMonth
int $dayOfWeek int$dayOfWeek
int $month int$month
string $monthName string$monthName
int $year int$year
int $century int$century
string $timezone string$timezone
string $md5 string$md5
string $sha1 string$sha1
string $sha256 string$sha256
string $locale string$locale
string $countryCode string$countryCode
string $countryISOAlpha3 string$countryISOAlpha3
string $languageCode string$languageCode
string $currencyCode string$currencyCode
boolean $boolean boolean$boolean
int $randomDigit int$randomDigit
int $randomDigitNotNull int$randomDigitNotNull
string $randomLetter string$randomLetter
string $randomAscii string$randomAscii
string $macProcessor string$macProcessor
string $linuxProcessor string$linuxProcessor
string $userAgent string$userAgent
string $chrome string$chrome
string $firefox string$firefox
string $safari string$safari
string $opera string$opera
string $internetExplorer string$internetExplorer
string $windowsPlatformToken string$windowsPlatformToken
string $macPlatformToken string$macPlatformToken
string $linuxPlatformToken string$linuxPlatformToken
string $uuid string$uuid
string $mimeType string$mimeType
string $fileExtension string$fileExtension
string $hexColor string$hexColor
string $safeHexColor string$safeHexColor
string $rgbColor string$rgbColor
array $rgbColorAsArray array$rgbColorAsArray
string $rgbCssColor string$rgbCssColor
string $safeColorName string$safeColorName
string $colorName string$colorName

Methods

addProvider($provider)

No description

getProviders()

No description

seed($seed = null)

No description

format($formatter, $arguments = array())

No description

Callable
getFormatter( string $formatter)

No description

string
parse( string $string)

Replaces tokens ('{{ tokenName }}') with the result from the token method call

mixed
__get( string $attribute)

No description

mixed
__call( string $method, array $attributes)

No description

string
name( string $gender = null)

No description

string
firstName( string $gender = null)

No description

string
title( string $gender = null)

No description

string
creditCardNumber($type = null, $formatted = false, $separator = '-')

No description

string
iban($countryCode = null, $prefix = '', $length = null)

No description

string|array
words($nb = 3, $asText = false)

No description

string
sentence($nbWords = 6, $variableNbWords = true)

No description

string|array
sentences($nb = 3, $asText = false)

No description

string
paragraph($nbSentences = 3, $variableNbSentences = true)

No description

string|array
paragraphs($nb = 3, $asText = false)

No description

string
text($maxNbChars = 200)

No description

string
realText($maxNbChars = 200, $indexSize = 2)

No description

string
password($minLength = 6, $maxLength = 20)

No description

string
slug($nbWords = 6, $variableNbWords = true)

No description

string
amPm($max = 'now')

No description

string
date($format = 'Y-m-d', $max = 'now')

No description

string
dayOfMonth($max = 'now')

No description

string
dayOfWeek($max = 'now')

No description

string
iso8601($max = 'now')

No description

string
month($max = 'now')

No description

string
monthName($max = 'now')

No description

string
time($format = 'H:i:s', $max = 'now')

No description

string
unixTime($max = 'now')

No description

string
year($max = 'now')

No description

dateTime($max = 'now', $timezone = null)

No description

dateTimeAd($max = 'now', $timezone = null)

No description

dateTimeBetween($startDate = '-30 years', $endDate = 'now')

No description

dateTimeInInterval($date = '-30 years', $interval = '+5 days', $timezone = null)

No description

dateTimeThisCentury($max = 'now', $timezone = null)

No description

dateTimeThisDecade($max = 'now', $timezone = null)

No description

dateTimeThisYear($max = 'now', $timezone = null)

No description

dateTimeThisMonth($max = 'now', $timezone = null)

No description

boolean
boolean($chanceOfGettingTrue = 50)

No description

int
randomNumber($nbDigits = null, $strict = false)

No description

int|string|null
randomKey( array $array = array())

No description

int
numberBetween($min, $max = 2147483647)

No description

float
randomFloat($nbMaxDecimals = null, $min, $max = null)

No description

mixed
randomElement( array $array = array('a')

)

array
randomElements( array $array = array('a')

, $count = 1, $allowDuplicates = false)

array|string
shuffle($arg = '')

No description

array
shuffleArray( array $array = array())

No description

string
shuffleString($string = '', $encoding = 'UTF-8')

No description

string
numerify($string = '###')

No description

string
lexify($string = '????')

No description

string
bothify($string = '## ??')

No description

string
asciify($string = '****')

No description

string
regexify($regex = '')

No description

string
toLower($string = '')

No description

string
toUpper($string = '')

No description

optional($weight = 0.5, $default = null)

No description

unique($reset = false, $maxRetries = 10000)

No description

valid($validator = null, $maxRetries = 10000)

No description

integer
biasedNumberBetween($min, $max = 100, $function = 'sqrt')

No description

string
file($sourceDirectory = '/tmp', $targetDirectory = '/tmp', $fullPath = true)

No description

string
imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false)

No description

string
image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null)

No description

string
randomHtml($maxDepth = 4, $maxWidth = 4)

No description

Details

addProvider($provider)

Parameters

$provider

getProviders()

seed($seed = null)

Parameters

$seed

format($formatter, $arguments = array())

Parameters

$formatter
$arguments

Callable getFormatter( string $formatter)

Parameters

string $formatter

Return Value

Callable

string parse( string $string)

Replaces tokens ('{{ tokenName }}') with the result from the token method call

Parameters

string $string String that needs to bet parsed

Return Value

string

mixed __get( string $attribute)

Parameters

string $attribute

Return Value

mixed

mixed __call( string $method, array $attributes)

Parameters

string $method
array $attributes

Return Value

mixed

string name( string $gender = null)

Parameters

string $gender

Return Value

string

string firstName( string $gender = null)

Parameters

string $gender

Return Value

string

string title( string $gender = null)

Parameters

string $gender

Return Value

string

string creditCardNumber($type = null, $formatted = false, $separator = '-')

Parameters

$type
$formatted
$separator

Return Value

string

string iban($countryCode = null, $prefix = '', $length = null)

Parameters

$countryCode
$prefix
$length

Return Value

string

string|array words($nb = 3, $asText = false)

Parameters

$nb
$asText

Return Value

string|array

string sentence($nbWords = 6, $variableNbWords = true)

Parameters

$nbWords
$variableNbWords

Return Value

string

string|array sentences($nb = 3, $asText = false)

Parameters

$nb
$asText

Return Value

string|array

string paragraph($nbSentences = 3, $variableNbSentences = true)

Parameters

$nbSentences
$variableNbSentences

Return Value

string

string|array paragraphs($nb = 3, $asText = false)

Parameters

$nb
$asText

Return Value

string|array

string text($maxNbChars = 200)

Parameters

$maxNbChars

Return Value

string

string realText($maxNbChars = 200, $indexSize = 2)

Parameters

$maxNbChars
$indexSize

Return Value

string

string password($minLength = 6, $maxLength = 20)

Parameters

$minLength
$maxLength

Return Value

string

string slug($nbWords = 6, $variableNbWords = true)

Parameters

$nbWords
$variableNbWords

Return Value

string

string amPm($max = 'now')

Parameters

$max

Return Value

string

string date($format = 'Y-m-d', $max = 'now')

Parameters

$format
$max

Return Value

string

string dayOfMonth($max = 'now')

Parameters

$max

Return Value

string

string dayOfWeek($max = 'now')

Parameters

$max

Return Value

string

string iso8601($max = 'now')

Parameters

$max

Return Value

string

string month($max = 'now')

Parameters

$max

Return Value

string

string monthName($max = 'now')

Parameters

$max

Return Value

string

string time($format = 'H:i:s', $max = 'now')

Parameters

$format
$max

Return Value

string

string unixTime($max = 'now')

Parameters

$max

Return Value

string

string year($max = 'now')

Parameters

$max

Return Value

string

DateTime dateTime($max = 'now', $timezone = null)

Parameters

$max
$timezone

Return Value

DateTime

DateTime dateTimeAd($max = 'now', $timezone = null)

Parameters

$max
$timezone

Return Value

DateTime

DateTime dateTimeBetween($startDate = '-30 years', $endDate = 'now')

Parameters

$startDate
$endDate

Return Value

DateTime

DateTime dateTimeInInterval($date = '-30 years', $interval = '+5 days', $timezone = null)

Parameters

$date
$interval
$timezone

Return Value

DateTime

DateTime dateTimeThisCentury($max = 'now', $timezone = null)

Parameters

$max
$timezone

Return Value

DateTime

DateTime dateTimeThisDecade($max = 'now', $timezone = null)

Parameters

$max
$timezone

Return Value

DateTime

DateTime dateTimeThisYear($max = 'now', $timezone = null)

Parameters

$max
$timezone

Return Value

DateTime

DateTime dateTimeThisMonth($max = 'now', $timezone = null)

Parameters

$max
$timezone

Return Value

DateTime

boolean boolean($chanceOfGettingTrue = 50)

Parameters

$chanceOfGettingTrue

Return Value

boolean

int randomNumber($nbDigits = null, $strict = false)

Parameters

$nbDigits
$strict

Return Value

int

int|string|null randomKey( array $array = array())

Parameters

array $array

Return Value

int|string|null

int numberBetween($min, $max = 2147483647)

Parameters

$min
$max

Return Value

int

float randomFloat($nbMaxDecimals = null, $min, $max = null)

Parameters

$nbMaxDecimals
$min
$max

Return Value

float

mixed randomElement( array $array = array('a')

)

Parameters

array $array

Return Value

mixed

array randomElements( array $array = array('a')

, $count = 1, $allowDuplicates = false)

Parameters

array $array

Return Value

array

array|string shuffle($arg = '')

Parameters

$arg

Return Value

array|string

array shuffleArray( array $array = array())

Parameters

array $array

Return Value

array

string shuffleString($string = '', $encoding = 'UTF-8')

Parameters

$string
$encoding

Return Value

string

string numerify($string = '###')

Parameters

$string

Return Value

string

string lexify($string = '????')

Parameters

$string

Return Value

string

string bothify($string = '## ??')

Parameters

$string

Return Value

string

string asciify($string = '****')

Parameters

$string

Return Value

string

string regexify($regex = '')

Parameters

$regex

Return Value

string

string toLower($string = '')

Parameters

$string

Return Value

string

string toUpper($string = '')

Parameters

$string

Return Value

string

Generator optional($weight = 0.5, $default = null)

Parameters

$weight
$default

Return Value

Generator

Generator unique($reset = false, $maxRetries = 10000)

Parameters

$reset
$maxRetries

Return Value

Generator

Generator valid($validator = null, $maxRetries = 10000)

Parameters

$validator
$maxRetries

Return Value

Generator

integer biasedNumberBetween($min, $max = 100, $function = 'sqrt')

Parameters

$min
$max
$function

Return Value

integer

string file($sourceDirectory = '/tmp', $targetDirectory = '/tmp', $fullPath = true)

Parameters

$sourceDirectory
$targetDirectory
$fullPath

Return Value

string

string imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false)

Parameters

$width
$height
$category
$randomize
$word
$gray

Return Value

string

string image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null)

Parameters

$dir
$width
$height
$category
$fullPath
$randomize
$word

Return Value

string

string randomHtml($maxDepth = 4, $maxWidth = 4)

Parameters

$maxDepth
$maxWidth

Return Value

string