global_scope_manager
Global Scope Manager.
Centralizes the registration and application of global query scopes.
Table of Contents
Properties
Methods
- apply_all() : query_builder_interface
- Apply all registered and applicable scopes to a QueryBuilder.
- get_registered_identifiers() : array<string|int, string>
- Get all registered scope identifiers.
- register() : void
- Register a new global scope.
Properties
$scopes
private
global_scope_interface
$scopes
= []
Methods
apply_all()
Apply all registered and applicable scopes to a QueryBuilder.
public
apply_all(query_builder_interface $builder[, array<string|int, string> $excluded = [] ]) : query_builder_interface
Parameters
- $builder : query_builder_interface
- $excluded : array<string|int, string> = []
-
List of scope identifiers to skip
Return values
query_builder_interfaceget_registered_identifiers()
Get all registered scope identifiers.
public
get_registered_identifiers() : array<string|int, string>
Return values
array<string|int, string>register()
Register a new global scope.
public
register(string $identifier, global_scope_interface $scope) : void
Parameters
- $identifier : string
-
A unique name for the scope
- $scope : global_scope_interface