ModelParam uses ConstantsTrait, ModelParamTrait
Enumeration of all the common model parameters.
Each constant is the canonical key recognized inside the $init options
array that model operations (DocumentsModel)
and model factories accept — for instance key, document, binds,
conditions, sort, cache or ttl. Referencing these constants instead
of raw strings keeps configuration arrays and DI definitions in sync and free
of magic strings.
The constants themselves live in ModelParamTrait; this class simply
exposes them together with the ConstantsTrait reflection helpers
(ModelParam::getAll(), ModelParam::includes(), …).
Example:
use oihana\models\enums\ModelParam;
$init =
[
ModelParam::KEY => 'users/42' ,
ModelParam::CONDITIONS => 'doc.active == true' ,
ModelParam::SORT => 'name' ,
ModelParam::CACHE => true ,
ModelParam::TTL => 3600 ,
];
Tags
Table of Contents
Constants
- ALTER_KEY : string = 'alterKey'
- The 'alterKey' parameter.
- ALTERS : string = 'alters'
- The 'alters' parameter.
- BINDS : string = 'binds'
- The 'binds' parameter.
- BINDS_ALTERS : string = 'bindsAlters'
- The 'bindsAlters' parameter.
- CACHE : string = 'cache'
- The 'cache' parameter.
- CONDITIONS : string = 'conditions'
- The 'conditions' parameter.
- DEBUG : string = 'debug'
- The 'debug' parameter.
- DEFAULT : string = 'default'
- The 'default' parameter.
- DEFER_ASSIGNMENT : string = 'deferAssignment'
- The 'deferAssignment' parameter.
- ENFORCE : string = 'enforce'
- The 'enforce' parameter.
- ENSURE : string = 'ensure'
- The 'ensure' parameter.
- ID : string = 'id'
- The 'id' parameter.
- KEY : string = 'key'
- The 'key' parameter.
- KEYS : string = 'keys'
- The 'keys' parameter.
- LIST : string = 'list'
- The 'list' parameter.
- LOGGABLE : string = 'loggable'
- The 'loggable' parameter.
- LOGGER : string = 'logger'
- The 'logger' parameter.
- MOCK : string = 'mock'
- The 'mock' parameter.
- MODEL : string = 'model'
- The 'model' parameter.
- OPTIMIZED : string = 'optimized'
- The 'optimized' parameter.
- OWNER : string = 'owner'
- The 'owner' parameter.
- PDO : string = 'pdo'
- The 'pdo' parameter.
- QUERY : string = 'query'
- The 'query' parameter.
- QUERY_BUILDER : string = 'queryBuilder'
- The 'queryBuilder' parameter.
- QUERY_FIELDS : string = 'queryFields'
- The 'queryFields' parameter.
- QUERY_ID : string = 'queryId'
- The 'queryId' parameter.
- SCHEMA : string = 'schema'
- The 'schema' parameter.
- SORT : string = 'sort'
- The 'sort' parameter.
- SORT_DEFAULT : string = 'sortDefault'
- The 'sortDefault' parameter.
- THROWABLE : string = 'throwable'
- The 'throwable' parameter.
- TTL : string = 'ttl'
- The 'ttl' parameter.
- VALUE : string = 'value'
- The 'value' parameter.
Constants
ALTER_KEY
The 'alterKey' parameter.
public
string
ALTER_KEY
= 'alterKey'
Defines the default 'alter' key identifier.
ALTERS
The 'alters' parameter.
public
string
ALTERS
= 'alters'
BINDS
The 'binds' parameter.
public
string
BINDS
= 'binds'
BINDS_ALTERS
The 'bindsAlters' parameter.
public
string
BINDS_ALTERS
= 'bindsAlters'
CACHE
The 'cache' parameter.
public
string
CACHE
= 'cache'
CONDITIONS
The 'conditions' parameter.
public
string
CONDITIONS
= 'conditions'
DEBUG
The 'debug' parameter.
public
string
DEBUG
= 'debug'
DEFAULT
The 'default' parameter.
public
string
DEFAULT
= 'default'
DEFER_ASSIGNMENT
The 'deferAssignment' parameter.
public
string
DEFER_ASSIGNMENT
= 'deferAssignment'
ENFORCE
The 'enforce' parameter.
public
string
ENFORCE
= 'enforce'
ENSURE
The 'ensure' parameter.
public
string
ENSURE
= 'ensure'
ID
The 'id' parameter.
public
string
ID
= 'id'
KEY
The 'key' parameter.
public
string
KEY
= 'key'
KEYS
The 'keys' parameter.
public
string
KEYS
= 'keys'
LIST
The 'list' parameter.
public
string
LIST
= 'list'
LOGGABLE
The 'loggable' parameter.
public
string
LOGGABLE
= 'loggable'
LOGGER
The 'logger' parameter.
public
string
LOGGER
= 'logger'
MOCK
The 'mock' parameter.
public
string
MOCK
= 'mock'
MODEL
The 'model' parameter.
public
string
MODEL
= 'model'
OPTIMIZED
The 'optimized' parameter.
public
string
OPTIMIZED
= 'optimized'
OWNER
The 'owner' parameter.
public
string
OWNER
= 'owner'
PDO
The 'pdo' parameter.
public
string
PDO
= 'pdo'
QUERY
The 'query' parameter.
public
string
QUERY
= 'query'
QUERY_BUILDER
The 'queryBuilder' parameter.
public
string
QUERY_BUILDER
= 'queryBuilder'
QUERY_FIELDS
The 'queryFields' parameter.
public
string
QUERY_FIELDS
= 'queryFields'
QUERY_ID
The 'queryId' parameter.
public
string
QUERY_ID
= 'queryId'
SCHEMA
The 'schema' parameter.
public
string
SCHEMA
= 'schema'
SORT
The 'sort' parameter.
public
string
SORT
= 'sort'
SORT_DEFAULT
The 'sortDefault' parameter.
public
string
SORT_DEFAULT
= 'sortDefault'
THROWABLE
The 'throwable' parameter.
public
string
THROWABLE
= 'throwable'
TTL
The 'ttl' parameter.
public
string
TTL
= 'ttl'
VALUE
The 'value' parameter.
public
string
VALUE
= 'value'