class global_scope_manager

Global Scope Manager.

Centralizes the registration and application of global query scopes.

Methods

void
register(string $identifier, global_scope_interface $scope)

Register a new global scope.

apply_all(query_builder_interface $builder, array $excluded = [])

Apply all registered and applicable scopes to a QueryBuilder.

array
get_registered_identifiers()

Get all registered scope identifiers.

Details

at line 39
void register(string $identifier, global_scope_interface $scope)

Register a new global scope.

Parameters

string $identifier

A unique name for the scope

global_scope_interface $scope

Return Value

void

at line 52
query_builder_interface apply_all(query_builder_interface $builder, array $excluded = [])

Apply all registered and applicable scopes to a QueryBuilder.

Parameters

query_builder_interface $builder
array $excluded

List of scope identifiers to skip

Return Value

query_builder_interface

at line 74
array get_registered_identifiers()

Get all registered scope identifiers.

Return Value

array