Module
in package
implements
SaveableInterface
Uses
Creator, Deletor, PropertyManager
An installed module in the system. Note that module metadata is stored in the composer.json for each module.
Tags
Interfaces, Classes and Traits
- SaveableInterface
- Interface for createable models.
Table of Contents
- $createdAt : mixed
- $library : mixed
- $properties : mixed
- $propertyClass : mixed
- $propertyStorage : mixed
- __construct() : mixed
- Construct a new module entry.
- create() : CreateableInterface
- Creates and returns an entity instance and fills values.
- delete() : mixed
- Deletes the entity.
- getCreatedAt() : DateTime
- Returns the time this module was added to the system.
- getLibrary() : string
- Returns the library of this module, in the form 'vendor/project-name', usable by the Composer package manager.
- getProperty() : mixed
- Returns a property with its stored type.
- loadProperties() : void
- Loads properties.
- setProperty() : void
- Sets a property to a given value.
- unsetProperty() : void
- Deletes a property.
Properties
$createdAt
private
mixed
$createdAt
Tags
$library
private
mixed
$library
Tags
$properties
private
mixed
$properties
Tags
$propertyClass
private
mixed
$propertyClass
= LotGDCoreModelsModuleProperty::class
$propertyStorage
private
mixed
$propertyStorage
= null
Methods
__construct()
Construct a new module entry.
public
__construct(string $library) : mixed
Parameters
- $library : string
Return values
mixed —create()
Creates and returns an entity instance and fills values.
public
static create(array<string|int, mixed> $arguments) : CreateableInterface
Parameters
- $arguments : array<string|int, mixed>
-
The values the instance should get
Tags
Return values
CreateableInterface —The created Entity
delete()
Deletes the entity.
public
delete(EntityManagerInterface $em) : mixed
Parameters
- $em : EntityManagerInterface
Return values
mixed —getCreatedAt()
Returns the time this module was added to the system.
public
getCreatedAt() : DateTime
Return values
DateTime —getLibrary()
Returns the library of this module, in the form 'vendor/project-name', usable by the Composer package manager.
public
getLibrary() : string
Return values
string —getProperty()
Returns a property with its stored type.
public
getProperty(string $name[, mixed $default = null ]) : mixed
Parameters
- $name : string
- $default : mixed = null
Return values
mixed —loadProperties()
Loads properties.
public
loadProperties() : void
Return values
void —setProperty()
Sets a property to a given value.
public
setProperty(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
Return values
void —unsetProperty()
Deletes a property.
public
unsetProperty(string $name) : void
Parameters
- $name : string