Oihana PHP

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
author

Marc Alcaraz

since
1.0.0
see
ModelParamTrait

For the full list of parameter constants.

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.

BINDS_ALTERS

The 'bindsAlters' parameter.

public string BINDS_ALTERS = 'bindsAlters'

CONDITIONS

The 'conditions' parameter.

public string CONDITIONS = 'conditions'

DEFER_ASSIGNMENT

The 'deferAssignment' parameter.

public string DEFER_ASSIGNMENT = 'deferAssignment'

LOGGABLE

The 'loggable' parameter.

public string LOGGABLE = 'loggable'

OPTIMIZED

The 'optimized' parameter.

public string OPTIMIZED = 'optimized'

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'

SORT_DEFAULT

The 'sortDefault' parameter.

public string SORT_DEFAULT = 'sortDefault'

THROWABLE

The 'throwable' parameter.

public string THROWABLE = 'throwable'
On this page

Search results