104 public function addProperty($name, $type, $lazy = FALSE, $cascade =
'') {
105 $type = $this->typeHandlingService->parseType($type);
106 $this->properties[$name] = array(
107 'type' => $type[
'type'],
108 'elementType' => $type[
'elementType'],
110 'cascade' => $cascade
122 return is_array($this->properties[$propertyName]) ? $this->properties[$propertyName] : array();
142 if ($modelType < self::MODELTYPE_ENTITY || $modelType > self::MODELTYPE_VALUEOBJECT) {
143 throw new \InvalidArgumentException(
'"' .
$modelType .
'" is an invalid model type.', 1212519195);
165 $this->aggregateRoot = $isRoot;
185 return array_key_exists($propertyName, $this->properties);
196 if (!array_key_exists($propertyName, $this->properties)) {
197 throw new \InvalidArgumentException(
'Property "' . $propertyName .
'" must be added to the class schema before it can be marked as UUID property.', 1233863842);
199 $this->uuidPropertyName = $propertyName;
221 if (!array_key_exists($propertyName, $this->properties)) {
222 throw new \InvalidArgumentException(
'Property "' . $propertyName .
'" must be added to the class schema before it can be marked as identity property.', 1233775407);
224 if ($this->properties[$propertyName][
'lazy'] === TRUE) {
225 throw new \InvalidArgumentException(
'Property "' . $propertyName .
'" must not be makred for lazy loading to be marked as identity property.', 1239896904);
227 $this->identityProperties[$propertyName] = $this->properties[$propertyName][
'type'];
markAsIdentityProperty($propertyName)
setAggregateRoot($isRoot)
const MODELTYPE_VALUEOBJECT
getProperty($propertyName)
hasProperty($propertyName)
setUuidPropertyName($propertyName)
addProperty($name, $type, $lazy=FALSE, $cascade='')