class CollectionHelper (View source)

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

Constants

DEFAULT_STRATEGY

Methods

static bool
isAtomic(string $strategy)

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

static bool
isHash(string $strategy)

Returns whether Collection hold associative array.

static bool
isList(string $strategy)

Returns whether Collection hold array indexed by consecutive numbers.

static bool
usesSet(string $strategy)

Returns whether strategy uses $set to update its data.

Details

static bool isAtomic(string $strategy)

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

Parameters

string $strategy

Return Value

bool

static bool isHash(string $strategy)

Returns whether Collection hold associative array.

Parameters

string $strategy

Return Value

bool

static bool isList(string $strategy)

Returns whether Collection hold array indexed by consecutive numbers.

Parameters

string $strategy

Return Value

bool

static bool usesSet(string $strategy)

Returns whether strategy uses $set to update its data.

Parameters

string $strategy

Return Value

bool