ClassSchema
class ClassSchema (View source)
A class schema
Constants
MODELTYPE_ENTITY |
Available model types |
MODELTYPE_VALUEOBJECT |
|
Properties
protected string | $className | Name of the class this schema is referring to |
|
protected int | $modelType | Model type of the class this schema is referring to |
|
protected bool | $lazyLoadable | Whether instances of the class can be lazy-loadable |
|
protected string | $repositoryClassName | ||
protected array | $properties | Properties of the class which need to be persisted |
|
protected array | $identityProperties | The properties forming the identity of an object |
Methods
Constructs this class schema
Returns the class name this schema is referring to
Marks the class as being lazy-loadable.
Marks the class as being lazy-loadable.
Adds (defines) a specific property and its type.
Returns the given property defined in this schema. Check with hasProperty($propertyName) before!
Returns all properties defined in this schema
Checks if the given property defined in this schema is multi-valued (i.e.
Sets the model type of the class this schema is referring to.
Returns the model type of the class this schema is referring to.
Set the class name of the repository managing an entity.
No description
Whether the class is accessible through a repository and therefore an aggregate root.
If the class schema has a certain property.
If a certain class schema property is to be lazy loaded
If a certain class schema property is to disregarded for persistence
If a certain class schema property is nullable
Marks the given property as one of properties forming the identity of an object. The property must already be registered in the class schema.
Gets the properties (names and types) forming the identity of an object.
Details
__construct(string $className)
Constructs this class schema
string
getClassName()
Returns the class name this schema is referring to
void
setLazyLoadableObject(bool $lazyLoadable)
Marks the class as being lazy-loadable.
bool
isLazyLoadableObject()
Marks the class as being lazy-loadable.
void
addProperty(string $name, string $type, bool $lazy = false, bool $transient = false)
Adds (defines) a specific property and its type.
array
getProperty(string $propertyName)
Returns the given property defined in this schema. Check with hasProperty($propertyName) before!
array
getProperties()
Returns all properties defined in this schema
bool
isMultiValuedProperty(string $propertyName)
Checks if the given property defined in this schema is multi-valued (i.e.
array or SplObjectStorage).
void
setModelType(int $modelType)
Sets the model type of the class this schema is referring to.
int
getModelType()
Returns the model type of the class this schema is referring to.
void
setRepositoryClassName(string $repositoryClassName)
Set the class name of the repository managing an entity.
string
getRepositoryClassName()
No description
bool
isAggregateRoot()
Whether the class is accessible through a repository and therefore an aggregate root.
bool
hasProperty(string $propertyName)
If the class schema has a certain property.
bool
isPropertyLazy(string $propertyName)
If a certain class schema property is to be lazy loaded
bool
isPropertyTransient(string $propertyName)
If a certain class schema property is to disregarded for persistence
bool
isPropertyNullable(string $propertyName)
If a certain class schema property is nullable
void
markAsIdentityProperty(string $propertyName)
Marks the given property as one of properties forming the identity of an object. The property must already be registered in the class schema.
array
getIdentityProperties()
Gets the properties (names and types) forming the identity of an object.