Oihana PHP

Alter uses ConstantsTrait

Enumeration of all transformation or filter operations that can be applied to an object property or an array key.

Each constant represents a type of alteration that can be performed when normalizing or processing data within models or collections.

Examples of usage include:

  • Converting a value to a specific type (INT, FLOAT)
  • Cleaning or normalizing arrays or strings (CLEAN, NORMALIZE)
  • Parsing or serializing JSON (JSON_PARSE, JSON_STRINGIFY)
  • Applying custom callbacks (CALL) or map (MAP)
  • Extracting values via getters (GET)
  • Handling URLs or array transformations (URL, ARRAY)
Tags
author

Marc Alcaraz

since
1.0.0
see
AlterDocumentTrait

For usage of alter rules in models.

Table of Contents

Constants

ARRAY  : string = 'array'
CALL  : string = 'call'
CLEAN  : string = 'clean'
FLOAT  : string = 'float'
GET  : string = 'get'
HYDRATE  : string = 'hydrate'
INT  : string = 'int'
JSON_PARSE  : string = 'jsonParse'
JSON_STRINGIFY  : string = 'jsonStringify'
LIST  : string = 'list'
LISTIFY  : string = 'listify'
MAP  : string = 'map'
NORMALIZE  : string = 'normalize'
NOT  : string = 'not'
URL  : string = 'url'
VALUE  : string = 'value'

Constants

ARRAY

public string ARRAY = 'array'

CALL

public string CALL = 'call'

CLEAN

public string CLEAN = 'clean'

FLOAT

public string FLOAT = 'float'

GET

public string GET = 'get'

HYDRATE

public string HYDRATE = 'hydrate'

INT

public string INT = 'int'

JSON_PARSE

public string JSON_PARSE = 'jsonParse'

JSON_STRINGIFY

public string JSON_STRINGIFY = 'jsonStringify'

LIST

public string LIST = 'list'

LISTIFY

public string LISTIFY = 'listify'

MAP

public string MAP = 'map'

NORMALIZE

public string NORMALIZE = 'normalize'

NOT

public string NOT = 'not'

URL

public string URL = 'url'

VALUE

public string VALUE = 'value'
On this page

Search results