v1.0.0
English

Fabricator.php

system/Test/Fabricator.php
1 class 23 methods

class Fabricator

Fabricator Bridge class for using Faker to create example data based on model specifications.
__construct ($model, ?array $formatters = null, ?string $locale = null) public
resetCounts () public
getCount (string $table) public
setCount (string $table, int $count) public
upCount (string $table) public
downCount (string $table) public
getModel () public
getLocale () public
getFaker () public
getOverrides () public
setOverrides (array $overrides = [], $persist = true) public
setUnique (string $field, bool $reset = false, int $maxRetries = 10000) public
setOptional (string $field, float $weight = 0.5, mixed $default = null) public
setValid (string $field, ?Closure $validator = null, int $maxRetries = 10000) public
getFormatters () public
setFormatters (?array $formatters = null) public
detectFormatters () protected
guessFormatter ($field) protected
make (?int $count = null) public
makeArray () public
makeObject (?string $className = null) public
create (?int $count = null, bool $mock = false) public
createMock (?int $count = null) protected
phpDG v1.0.0 Fabricator.php 662 files 498 classes 763 fn
Generated