class ObjectArray extends ArrayType (View source)

A datatype that replaces references to entities in arrays with a type/identifier tuple and strips singletons from the data to be stored.

Constants

private OBJECTARRAY

Properties

protected $persistenceManager
protected $reflectionService

Methods

string
getName()

No description

string
getSQLDeclaration(array $column, AbstractPlatform $platform)

Use a BLOB instead of CLOB

int
getBindingType()

Use LARGE_OBJECT instead of STRING

array
convertToPHPValue($value, AbstractPlatform $platform)

No description

mixed
convertToDatabaseValue($value, AbstractPlatform $platform)

Converts a value from its PHP representation to its database representation of this type.

void
initializeDependencies()

Fetches dependencies from the static object manager.

void
decodeObjectReferences(array $array)

Traverses the $array and replaces known persisted objects (tuples of type and identifier) with actual instances.

void
encodeObjectReferences(array $array)

Traverses the $array and replaces known persisted objects with a tuple of type and identifier.

Details

string getName()

No description

Return Value

string

string getSQLDeclaration(array $column, AbstractPlatform $platform)

Use a BLOB instead of CLOB

Parameters

array $column
AbstractPlatform $platform

Return Value

string

int getBindingType()

Use LARGE_OBJECT instead of STRING

Return Value

int

array convertToPHPValue($value, AbstractPlatform $platform)

No description

Parameters

$value
AbstractPlatform $platform

Return Value

array

Exceptions

ConversionException

mixed convertToDatabaseValue($value, AbstractPlatform $platform)

Converts a value from its PHP representation to its database representation of this type.

Parameters

$value
AbstractPlatform $platform

Return Value

mixed

protected void initializeDependencies()

Fetches dependencies from the static object manager.

Injection cannot be used, since __construct on Types\Type is final.

Return Value

void

protected void decodeObjectReferences(array $array)

Traverses the $array and replaces known persisted objects (tuples of type and identifier) with actual instances.

Parameters

array $array

Return Value

void

protected void encodeObjectReferences(array $array)

Traverses the $array and replaces known persisted objects with a tuple of type and identifier.

Parameters

array $array

Return Value

void

Exceptions

RuntimeException