PHP Class Faker\Generator

Show file Open project: fzaninotto/faker Class Usage Examples

Protected Properties

Property Type Description
$formatters
$providers

Public Methods

Method Description
__call ( string $method, array $attributes )
__get ( string $attribute )
addProvider ( $provider )
format ( $formatter, $arguments = [] )
getFormatter ( $formatter ) : Callable
getProviders ( )
parse ( string $string ) : string Replaces tokens ('{{ tokenName }}') with the result from the token method call
seed ( $seed = null )

Protected Methods

Method Description
callFormatWithMatches ( $matches )

Method Details

__call() public method

public __call ( string $method, array $attributes )
$method string
$attributes array

__get() public method

public __get ( string $attribute )
$attribute string

addProvider() public method

public addProvider ( $provider )

callFormatWithMatches() protected method

protected callFormatWithMatches ( $matches )

format() public method

public format ( $formatter, $arguments = [] )

getFormatter() public method

public getFormatter ( $formatter ) : Callable
return Callable

getProviders() public method

public getProviders ( )

parse() public method

Replaces tokens ('{{ tokenName }}') with the result from the token method call
public parse ( string $string ) : string
$string string String that needs to bet parsed
return string

seed() public method

public seed ( $seed = null )

Property Details

$formatters protected property

protected $formatters

$providers protected property

protected $providers