lucee.Component
interceptors.Mementifier
Listen to various entity methods so we can inject our mementifying capabilties to objects. If an object already has a `getMemento()` method, we will inject a `$getMemento()` method so you can still decorate it.
| Property Summary | ||||
|---|---|---|---|---|
| type | property | default | serializable | required |
any
|
settings
|
true
|
false
|
|
| Method Summary | |
|---|---|
any
|
$buildNestedMementoList(any list, any root)
Build a new memento include/exclude list using the target list and a property root. |
any
|
$injectMixin([any name], [any target])
Inject mixins into target scopes. |
any
|
afterInstanceCreation([any interceptData])
Listen to object creations. |
any
|
configure()
Configure interceptor. |
struct
|
getMemento([any includes=''], [any excludes=''], [struct mappers='[runtime expression]'], [struct defaults='[runtime expression]'], [boolean ignoreDefaults='false'])
Construct a memento representation from an entity according to includes and exclude lists. |
any
|
ORMPostLoad([any interceptData])
Listen to entity loads. |
any
|
ORMPostNew([any interceptData])
Listen to entity creations. |
any
|
processMemento([any entity])
Process the memento decorations. |
| Methods inherited from class lucee.Component |
|---|
| None |
| Property Detail |
|---|
access - publicrequired - falsereturntype - anyinject - coldbox:moduleSettings:mementifierserializable - true| Method Detail |
|---|
Build a new memento include/exclude list using the target list and a property root
list - The list to use for constructionroot - The root to filter outInject mixins into target scopes
nametargetListen to object creations
interceptDataConfigure interceptor
Construct a memento representation from an entity according to includes and exclude lists
includes - The properties array or list to build the memento with alongside the default includesexcludes - The properties array or list to exclude from the memento alongside the default excludesmappers - A struct of key-function pairs that will map properties to closures/lambadas to process the item value. The closure will transform the item value.defaults - A struct of key-value pairs that denotes the default values for properties if they are null, defaults for everything are a blank string.ignoreDefaults - If set to true, default includes and excludes will be ignored and only the incoming `includes` and `excludes` list will be used.Listen to entity loads
interceptData - trueListen to entity creations
interceptData - trueProcess the memento decorations
entity - The entity to process