![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct ($className) | |
getClassName () | |
addProperty ($name, $type, $lazy=false, $cascade= '') | |
getProperty ($propertyName) | |
getProperties () | |
setModelType ($modelType) | |
getModelType () | |
setAggregateRoot ($isRoot) | |
isAggregateRoot () | |
hasProperty ($propertyName) | |
setUuidPropertyName ($propertyName) | |
getUuidPropertyName () | |
markAsIdentityProperty ($propertyName) | |
getIdentityProperties () | |
Public Attributes | |
const | MODELTYPE_ENTITY = 1 |
const | MODELTYPE_VALUEOBJECT = 2 |
Protected Attributes | |
$className | |
$modelType = self::MODELTYPE_ENTITY | |
$aggregateRoot = false | |
$uuidPropertyName | |
$properties = array() | |
$identityProperties = array() | |
A class schema
http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
Definition at line 24 of file ClassSchema.php.
__construct | ( | $className | ) |
Constructs this class schema
string | $className | Name of the class this schema is referring to |
Definition at line 79 of file ClassSchema.php.
References ClassSchema\$className.
addProperty | ( | $name, | |
$type, | |||
$lazy = false , |
|||
$cascade = '' |
|||
) |
Adds (defines) a specific property and its type.
string | $name | Name of the property |
string | $type | Type of the property |
bool | $lazy | Whether the property should be lazy-loaded when reconstituting |
string | $cascade | Strategy to cascade the object graph. |
Definition at line 103 of file ClassSchema.php.
References TypeHandlingUtility\parseType().
getClassName | ( | ) |
Returns the class name this schema is referring to
Definition at line 89 of file ClassSchema.php.
References ClassSchema\$className.
getIdentityProperties | ( | ) |
Gets the properties (names and types) forming the identity of an object.
Definition at line 246 of file ClassSchema.php.
References ClassSchema\$identityProperties.
getModelType | ( | ) |
Returns the model type of the class this schema is referring to.
Definition at line 156 of file ClassSchema.php.
References ClassSchema\$modelType.
getProperties | ( | ) |
Returns all properties defined in this schema
Definition at line 131 of file ClassSchema.php.
References ClassSchema\$properties.
getProperty | ( | $propertyName | ) |
Returns the given property defined in this schema. Check with hasProperty($propertyName) before!
string | $propertyName |
Definition at line 121 of file ClassSchema.php.
getUuidPropertyName | ( | ) |
Gets the name of the property marked as uuid of an object
Definition at line 215 of file ClassSchema.php.
References ClassSchema\$uuidPropertyName.
hasProperty | ( | $propertyName | ) |
If the class schema has a certain property.
string | $propertyName | Name of the property |
Definition at line 190 of file ClassSchema.php.
isAggregateRoot | ( | ) |
Whether the class is an aggregate root and therefore accessible through a repository.
Definition at line 179 of file ClassSchema.php.
References ClassSchema\$aggregateRoot.
markAsIdentityProperty | ( | $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.
string | $propertyName |
\InvalidArgumentException |
Definition at line 229 of file ClassSchema.php.
setAggregateRoot | ( | $isRoot | ) |
Marks the class if it is root of an aggregate and therefore accessible through a repository - or not.
bool | $isRoot | TRUE if it is the root of an aggregate |
Definition at line 168 of file ClassSchema.php.
setModelType | ( | $modelType | ) |
Sets the model type of the class this schema is referring to.
int | $modelType | The model type, one of the MODELTYPE_* constants. |
\InvalidArgumentException |
Definition at line 143 of file ClassSchema.php.
References ClassSchema\$modelType.
setUuidPropertyName | ( | $propertyName | ) |
Sets the property marked as uuid of an object with
string | $propertyName |
\InvalidArgumentException |
Definition at line 202 of file ClassSchema.php.
|
protected |
Definition at line 51 of file ClassSchema.php.
Referenced by ClassSchema\isAggregateRoot().
|
protected |
Definition at line 37 of file ClassSchema.php.
Referenced by ClassSchema\__construct(), and ClassSchema\getClassName().
|
protected |
Definition at line 72 of file ClassSchema.php.
Referenced by ClassSchema\getIdentityProperties().
|
protected |
Definition at line 44 of file ClassSchema.php.
Referenced by ClassSchema\getModelType(), and ClassSchema\setModelType().
|
protected |
Definition at line 65 of file ClassSchema.php.
Referenced by ClassSchema\getProperties().
|
protected |
Definition at line 58 of file ClassSchema.php.
Referenced by ClassSchema\getUuidPropertyName().
const MODELTYPE_ENTITY = 1 |
Available model types
Definition at line 29 of file ClassSchema.php.
Referenced by ReflectionService\buildClassSchema().
const MODELTYPE_VALUEOBJECT = 2 |
Definition at line 30 of file ClassSchema.php.
Referenced by ReflectionService\buildClassSchema().