class PlayautoFactory extends Factory (View source)

Constants

private HEADER

private ORDER_FIELDS

Fields that identify one order rather than one product line.

Properties

protected int $count

How many is it creating the row

from  Factory
protected int $bundleSize

The number of order lines to generate for each order.

from  Factory
protected array $state

Change key-value pairs in the definition

from  Factory

Methods

array
definition()

Define the order sheet's default state.

static Factory
make()

Create a new Factory instance

from  Factory
count(int|null $count = null)

Update the count of the returned definitions

from  Factory
bundle(int $bundleSize)

Set the number of rows to create for each order.

from  Factory
state(array $state)

Update the state of the returned definitions

from  Factory
array
create()

Create rows, grouping adjacent rows into one order when requested.

array
header()

Get the stable column layout of generated PlayAuto samples.

array
applyState(array $record)

Apply configured values to a generated record.

from  Factory

Details

array definition()

Define the order sheet's default state.

Return Value

array

The method returns a row of a specific order sheet for a company

static Factory make()

Create a new Factory instance

Return Value

Factory

The method returns a new Factory instance

Factory count(int|null $count = null)

Update the count of the returned definitions

Parameters

int|null $count

The new count

Return Value

Factory

The method returns the new count

Factory bundle(int $bundleSize)

Set the number of rows to create for each order.

Factories that support grouped orders use this value to share order-level fields and calculate bundle totals.

Parameters

int $bundleSize

Return Value

Factory

Exceptions

InvalidArgumentException

Factory state(array $state)

Update the state of the returned definitions

Parameters

array $state

The new state

Return Value

Factory

The method returns the new state

array create()

Create rows, grouping adjacent rows into one order when requested.

Return Value

array

The method returns the definition with the given state and count

array header()

Get the stable column layout of generated PlayAuto samples.

Return Value

array

The header cells

protected array applyState(array $record)

Apply configured values to a generated record.

Parameters

array $record

Return Value

array