DefaultPersistentObject.php
57 * @param $initialData Associative array with initial attribute data to override default data (optional)
437 if ($mapper->hasAttribute($name) && $mapper->getAttribute($name) instanceof ReferenceDescription) {
454 $errorMessage = $messageInstance->getText("The value of '%0%' (%1%) is invalid.", [$messageInstance->getText($name), $value]);
getMapper()
Definition: DefaultPersistentObject.php:123
getIndispensableObjects()
Definition: DefaultPersistentObject.php:479
afterUpdate()
Definition: DefaultPersistentObject.php:326
ValidationException signals an exception in validation.
Definition: ValidationException.php:18
getType()
Definition: DefaultPersistentObject.php:116
beforeUpdate()
Definition: DefaultPersistentObject.php:320
NullMapper acts as there is no mapper.
Definition: NullMapper.php:27
static getDump($variable, $strlen=100, $width=25, $depth=10, $i=0, &$objects=[])
Get the dump of a variable as string.
Definition: StringUtil.php:29
DefaultPersistentObject is the base class of all persistent objects.
Definition: DefaultPersistentObject.php:34
PropertyChangeEvent signals a change of a property of a PersistentObject instance.
Definition: PropertyChangeEvent.php:22
__construct(ObjectId $oid=null, array $initialData=null)
Constructor.
Definition: DefaultPersistentObject.php:59
clearValues()
Definition: DefaultPersistentObject.php:259
mergeValues(PersistentObject $object)
Definition: DefaultPersistentObject.php:247
NodeValueIterator is used to iterate over all persistent values of a Node (not including relations).
Definition: NodeValueIterator.php:43
copyValues(PersistentObject $object, $copyPkValues=true)
Definition: DefaultPersistentObject.php:234
Validator is is the single entry point for validation.
Definition: Validator.php:23
__toString()
Get a string representation of the PersistentObject.
Definition: DefaultPersistentObject.php:638
__clone()
Definition: DefaultPersistentObject.php:216
dump()
Definition: DefaultPersistentObject.php:594
static underScoreToCamelCase($string, $firstLowerCase=false)
Convert a string in underscore notation to camel case notation.
Definition: StringUtil.php:365
getValueProperty($name, $property)
Definition: DefaultPersistentObject.php:521
const STATE_DELETED
Definition: PersistentObject.php:28
StateChangeEvent signals a change of the state of a PersistentObject instance.
Definition: StateChangeEvent.php:22
setState($state)
Definition: DefaultPersistentObject.php:176
afterInsert()
Definition: DefaultPersistentObject.php:308
getPropertyNames()
Definition: DefaultPersistentObject.php:513
setValue($name, $value, $forceSet=false, $trackChange=true)
Definition: DefaultPersistentObject.php:353
getValuePropertyNames($name)
Definition: DefaultPersistentObject.php:553
getOriginalValue($name)
Definition: DefaultPersistentObject.php:469
StringUtil provides support for string manipulation.
Definition: StringUtil.php:18
setValue($name, $value, $forceSet=false, $trackChange=true)
Set the value of an attribute if it exists.
validateValue($name, $value)
Definition: DefaultPersistentObject.php:423
getChangedValues()
Definition: DefaultPersistentObject.php:462
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:28
getState()
Definition: DefaultPersistentObject.php:169
ValueChangeEvent signals a change of a value of a PersistentObject instance.
Definition: ValueChangeEvent.php:22
getValue($name)
Definition: DefaultPersistentObject.php:343
beforeDelete()
Definition: DefaultPersistentObject.php:332
getValueNames($excludeTransient=false)
Definition: DefaultPersistentObject.php:568
setOID(ObjectId $oid)
Definition: DefaultPersistentObject.php:140
beforeInsert()
Definition: DefaultPersistentObject.php:302
Instances of ReferenceDescription describe reference attributes of PersistentObjects.
Definition: ReferenceDescription.php:21
afterLoad()
Definition: DefaultPersistentObject.php:314
afterDelete()
Definition: DefaultPersistentObject.php:338
setValueInternal($name, $value)
Internal (fast) version to set a value without any validation, state change, listener notification et...
Definition: DefaultPersistentObject.php:380
getDisplayValue()
Definition: DefaultPersistentObject.php:587
afterCreate()
Definition: DefaultPersistentObject.php:296
static getInstance($name, $dynamicConfiguration=[])
Definition: ObjectFactory.php:47
validateValues()
Definition: DefaultPersistentObject.php:403
getProperty($name)
Definition: DefaultPersistentObject.php:486
static validate($value, $validateDesc, $context=null)
Validate the given value against the given validateType description.
Definition: Validator.php:35
const STATE_CLEAN
Definition: PersistentObject.php:25
setValueProperty($name, $property, $value)
Definition: DefaultPersistentObject.php:543
setProperty($name, $value)
Definition: DefaultPersistentObject.php:503
PersistentObject defines the interface of all persistent objects.
Definition: PersistentObject.php:23
removeValue($name)
Definition: DefaultPersistentObject.php:394
static isValid($oid)
Check if a serialized ObjectId has a valid syntax, the type is known and if the number of primary key...
Definition: ObjectId.php:123
unserialize($serialized)
Definition: DefaultPersistentObject.php:647
setOIDInternal(ObjectId $oid, $triggerListeners)
Set the object id of the PersistentObject.
Definition: DefaultPersistentObject.php:150
hasValue($name)
Definition: DefaultPersistentObject.php:387
getOID()
Definition: DefaultPersistentObject.php:133
validateValueAgainstValidateType($name, $value)
Check a value's value against the validation type set on it.
Definition: DefaultPersistentObject.php:434
reset()
Definition: DefaultPersistentObject.php:274
ObjectFactory implements the service locator pattern by wrapping a Factory instance and providing sta...
Definition: ObjectFactory.php:24
const STATE_DIRTY
Definition: PersistentObject.php:26
serialize()
Definition: DefaultPersistentObject.php:642