PHP Class schmunk42\giiant\helpers\GiiantFaker

Inheritance: extends Faker\Factory
Show file Open project: schmunk42/yii2-giiant Class Usage Examples

Public Methods

Method Description
boolean ( ) : mixed
create ( ) : Generator Returns new instance of Faker generator class.
date ( null $format = null ) : mixed
datetime ( null $format = null ) : mixed
integer ( string $methodName = '' ) : mixed
number ( string $methodName = '' ) : mixed
provider ( string $type = self::TYPE_STRING, string $methodName = '', null $format = null ) Tries to execute Faker's provider methods like email, address, title etc, if method is found.
string ( string $methodName = '' ) : mixed
time ( null $format = null ) : mixed
timestamp ( null $format = null ) : mixed
value ( string $type = self::TYPE_STRING, string $methodName = '', null $format = null ) : mixed Returns Faker value.

Method Details

boolean() public static method

public static boolean ( ) : mixed
return mixed

create() public static method

Returns new instance of Faker generator class.
public static create ( ) : Generator
return Faker\Generator

date() public static method

public static date ( null $format = null ) : mixed
$format null - Custom format
return mixed

datetime() public static method

public static datetime ( null $format = null ) : mixed
$format null - Custom format
return mixed

integer() public static method

public static integer ( string $methodName = '' ) : mixed
$methodName string model's attribute type trying to match Faker's method name
return mixed

number() public static method

public static number ( string $methodName = '' ) : mixed
$methodName string model's attribute type trying to match Faker's method name
return mixed

provider() public static method

Tries to execute Faker's provider methods like email, address, title etc, if method is found.
public static provider ( string $type = self::TYPE_STRING, string $methodName = '', null $format = null )
$type string model's attribute type
$methodName string model's attribute type trying to match Faker's method name
$format null custom data format used in Faker

string() public static method

public static string ( string $methodName = '' ) : mixed
$methodName string model's attribute type trying to match Faker's method name
return mixed

time() public static method

public static time ( null $format = null ) : mixed
$format null - Custom format
return mixed

timestamp() public static method

public static timestamp ( null $format = null ) : mixed
$format null - Custom format
return mixed

value() public static method

Returns Faker value.
public static value ( string $type = self::TYPE_STRING, string $methodName = '', null $format = null ) : mixed
$type string model's attribute type
$methodName string model's attribute type trying to match Faker's method name
$format null custom data format used in Faker
return mixed