class CollectionHelper (View source)

Utility class used to unify checks on how collection strategies should behave.

Constants

DEFAULT_STRATEGY

Methods

static 
isAtomic(string $strategy)

Returns whether update query must be included in query updating owning document.

static 
isHash(string $strategy)

Returns whether Collection hold associative array.

static 
isList(string|null $strategy)

Returns whether Collection hold array indexed by consecutive numbers.

static 
usesSet(string $strategy)

Returns whether strategy uses $set to update its data.

Details

static isAtomic(string $strategy)

Returns whether update query must be included in query updating owning document.

Parameters

string $strategy

static isHash(string $strategy)

Returns whether Collection hold associative array.

Parameters

string $strategy

static isList(string|null $strategy)

Returns whether Collection hold array indexed by consecutive numbers.

Parameters

string|null $strategy

static usesSet(string $strategy)

Returns whether strategy uses $set to update its data.

Parameters

string $strategy