class BaseFactory

Class BaseFactory - Singleton factory class responsible for populating enities with erp data

Methods

__construct()

BaseFactory constructor.

static BaseFactory
getInstance()

No description

mixed
baseCreateComplex(mixed $entity, array $data, array $mappings, bool $isUpdate = false)

Populates given entity with data from erp base on mappings

Details

at line 31
__construct()

BaseFactory constructor.

at line 39
static BaseFactory getInstance()

Return Value

BaseFactory

at line 57
mixed baseCreateComplex(mixed $entity, array $data, array $mappings, bool $isUpdate = false)

Populates given entity with data from erp base on mappings

Parameters

mixed $entity
  • empty entity to populate
array $data
  • data to populate entity with
array $mappings
  • array defining which erp data
bool $isUpdate
  • defines if populating is done on existing entity, not all field should be updated

Return Value

mixed