AbstractFaker

Namespace

IO\Services\ItemSearch\Factories\Faker

Constants
Type Name Value Description

array

ES_LANGUAGES

['german','english','french','bulgarian','italian','spanish','turkish','dutch','portuguese','norwegian','romanian','danish','swedish','czech','russian']

Properties
Type Name Description

``

$isList

``

$range

``

$index

``

$list

``

$lang

``

$esLang

``

$plentyId

``

$globals

``

$translationCounter

``

$countries

Methods
public __construct()
public fill($data)
Parameters

Type

Name

Description

``

$data

public rand($values)
Parameters

Type

Name

Description

``

$values

public global()
public static resetGlobals()
public merge($object, $defaults)

Recursively merge values into an existing array

Parameters

Type

Name

Description

array

$object

The original object to merge values into

array

$defaults

The values to be merged into the original object if not set

public get($arr, $field):mixed

Get a nested value from an array by its path (e.g. "path.to.property")

Parameters

Type

Name

Description

array

$arr

The array to get the nested value from

string

$field

The path to the property to read

public isDefined($arr, $field):bool

Check if a nested property is defined in an array

Parameters

Type

Name

Description

array

$arr

The array to search the nested property in

string

$field

The path to the property to check

public hasAny($arr, $field, $key, $value):bool

Check if any entry of a list has a specific value.

Parameters

Type

Name

Description

array

$arr

The object containing the list to check entries in

string

$field

The path to the list inside the object to check entries

string

$key

Key inside each list entry to check

mixed

$value

Expected value of each entry

public number()
public float()
public percentage()
public text()
public word()
public trans()
public serial()
public hash()
public url()
public hexColor()
public timestamp()
public dateString($format = "Y-m-d H:i:s")
Parameters

Type

Name

Description

``

$format

public boolean()
public shopLanguage($skipActiveLang = false)
Parameters

Type

Name

Description

``

$skipActiveLang

public image()
public country()
public unit()