class IdentityLinker

Identity Connector Linker

Constants

CACHE_TYPE_HOST

CACHE_TYPE_ENDPOINT

TYPE_CATEGORY

TYPE_CUSTOMER

TYPE_CUSTOMER_ORDER

TYPE_DELIVERY_NOTE

TYPE_IMAGE

TYPE_MANUFACTURER

TYPE_PRODUCT

TYPE_SPECIFIC

TYPE_SPECIFIC_VALUE

TYPE_PAYMENT

TYPE_CROSSSELLING

TYPE_CROSSSELLING_GROUP

Properties

static protected IPrimaryKeyMapper $mapper Session Database Mapper
static bool $useCache
static protected array $cache
static protected IdentityLinker $instance
static protected array $types
static protected array $mappings
protected array $runtimeInfos

Methods

static IdentityLinker
getInstance(boolean $useCache = true)

Singleton

__construct(boolean $useCache = true)

Constructor

useCache(boolean $useCache)

Constructor

setPrimaryKeyMapper(IPrimaryKeyMapper $mapper)

Database setter

linkModel(DataModel $model, bool $isDeleted = false)

Database setter

linkIdentityList(Identity $identity, string $modelName, string $property, bool $isDeleted = false)

Linker for identity lists

int
getType(string $modelName, string $property = null)

Type id getter

boolean
isType(string $modelName, string $property = null)

Type id getter

string
getModelName(int $type)

Model name getter

boolean
exists(string $endpointId = null, integer $hostId = null, string $modelName, string $property, boolean $validate = false)

Checks if link exists

boolean
save(string $endpointId, integer $hostId, string $modelName, string $property = null)

Save link to database

boolean
delete(string $endpointId = null, integer $hostId = null, string $modelName)

Delete link from database

boolean
clear()

Clears the entire link table

string
getEndpointId(integer $hostId, string $modelName, string $property)

Endpoint ID getter

int
getHostId(string $endpointId, string $modelName, string $property)

Host ID getter

bool
checkCache(mixed $id, int $type, string $cacheType, bool $validate = false)

No description

bool|mixed
loadCache(mixed $id, int $type, string $cacheType)

No description

saveCache(mixed $endpointId, int $hostId, int $type, string $cacheType)

No description

deleteCache(mixed $endpointId = null, int $hostId = null, int $type, string $cacheType)

No description

string
buildKey(mixed $id, int $type, string $cacheType)

No description

static array
getCache()

No description

boolean
isValidEndpointId(mixed $endpointId)

No description

boolean
isValidHostId(mixed $hostId)

No description

Details

at line 266
static IdentityLinker getInstance(boolean $useCache = true)

Singleton

Parameters

boolean $useCache

Return Value

IdentityLinker

at line 282
protected __construct(boolean $useCache = true)

Constructor

Parameters

boolean $useCache

at line 293
IdentityLinker useCache(boolean $useCache)

Constructor

Parameters

boolean $useCache

Return Value

IdentityLinker

at line 303
setPrimaryKeyMapper(IPrimaryKeyMapper $mapper)

Database setter

Parameters

IPrimaryKeyMapper $mapper

at line 315
linkModel(DataModel $model, bool $isDeleted = false)

Database setter

Parameters

DataModel $model
bool $isDeleted

Exceptions

LinkerException

at line 404
linkIdentityList(Identity $identity, string $modelName, string $property, bool $isDeleted = false)

Linker for identity lists

Parameters

Identity $identity
string $modelName
string $property
bool $isDeleted

Exceptions

LinkerException

at line 437
int getType(string $modelName, string $property = null)

Type id getter

Parameters

string $modelName
string $property

Return Value

int

Exceptions

LinkerException

at line 490
boolean isType(string $modelName, string $property = null)

Type id getter

Parameters

string $modelName
string $property

Return Value

boolean

at line 505
string getModelName(int $type)

Model name getter

Parameters

int $type

Return Value

string

Exceptions

LinkerException

at line 526
boolean exists(string $endpointId = null, integer $hostId = null, string $modelName, string $property, boolean $validate = false)

Checks if link exists

Parameters

string $endpointId
integer $hostId
string $modelName
string $property
boolean $validate

Return Value

boolean

Exceptions

LinkerException

at line 584
boolean save(string $endpointId, integer $hostId, string $modelName, string $property = null)

Save link to database

Parameters

string $endpointId
integer $hostId
string $modelName
string $property

Return Value

boolean

Exceptions

LinkerException

at line 607
boolean delete(string $endpointId = null, integer $hostId = null, string $modelName)

Delete link from database

Parameters

string $endpointId
integer $hostId
string $modelName

Return Value

boolean

at line 627
boolean clear()

Clears the entire link table

Return Value

boolean

at line 640
string getEndpointId(integer $hostId, string $modelName, string $property)

Endpoint ID getter

Parameters

integer $hostId
string $modelName
string $property

Return Value

string

at line 669
int getHostId(string $endpointId, string $modelName, string $property)

Host ID getter

Parameters

string $endpointId
string $modelName
string $property

Return Value

int

at line 696
protected bool checkCache(mixed $id, int $type, string $cacheType, bool $validate = false)

Parameters

mixed $id
int $type
string $cacheType
bool $validate

Return Value

bool

at line 743
protected bool|mixed loadCache(mixed $id, int $type, string $cacheType)

Parameters

mixed $id
int $type
string $cacheType

Return Value

bool|mixed

at line 766
protected saveCache(mixed $endpointId, int $hostId, int $type, string $cacheType)

Parameters

mixed $endpointId
int $hostId
int $type
string $cacheType

at line 795
protected deleteCache(mixed $endpointId = null, int $hostId = null, int $type, string $cacheType)

Parameters

mixed $endpointId
int $hostId
int $type
string $cacheType

at line 824
protected string buildKey(mixed $id, int $type, string $cacheType)

Parameters

mixed $id
int $type
string $cacheType

Return Value

string

at line 832
static array getCache()

Return Value

array

at line 841
boolean isValidEndpointId(mixed $endpointId)

Parameters

mixed $endpointId

Return Value

boolean

at line 850
boolean isValidHostId(mixed $hostId)

Parameters

mixed $hostId

Return Value

boolean