ChanceGenerator
in package
This generator returns a default value for all called properties and methods. It works with Faker\Generator::optional().
Tags
Table of Contents
Properties
- $default : mixed
- $generator : mixed
- $weight : mixed
Methods
- __call() : mixed
- __construct() : mixed
- __get() : mixed
- Catch and proxy all generator calls but return only valid values
- ext() : mixed
Properties
$default
protected
mixed
$default
$generator
private
mixed
$generator
$weight
private
mixed
$weight
Methods
__call()
public
__call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
- $name : string
- $arguments : array<string|int, mixed>
__construct()
public
__construct(Extension|Generator $generator, float $weight[, mixed $default = null ]) : mixed
Parameters
__get()
Catch and proxy all generator calls but return only valid values
public
__get(string $attribute) : mixed
Parameters
- $attribute : string
Tags
ext()
public
ext(string $id) : mixed
Parameters
- $id : string