This repository has been archived. Please update to the combined package.s, (*1)
Provides some useful interfaces and traits that can be used with entities. The traits implement on
basic methods, and still require e.g. publish/unpublish to be implemented., (*2)
Unlike the somnambulist/laravel-doctrine-behaviours package, these behaviours are intended to be used in a
much more controlled and DDD based system. As such they do not implement setters and in some cases even
the methods defined in the interfaces as these are core domain methods that should raise events within
your system., (*4)
-
Activatable, (*5)
Adds activate()/deactivate() methods to an entity controlling if it is active or not. The entity should
implement activate/deactivate methods so that Events can be raised., (*6)
-
GloballyTrackable, (*7)
A collection of other interfaces: Identifiable, Nameable, Timestampable, UniversallyIdentifiable., (*8)
-
Identifiable, (*9)
Adds an id() method that returns the primary identifier (int, string, object), (*10)
-
IdentifiableWithTimestamps, (*11)
A combination of Identifiable and Timestampable, (*12)
-
Nameable, (*13)
Adds a name() method that returns the entity name component., (*14)
-
NumericallySortable, (*15)
Adds an ordinal() and update method for adding a numerical sorting index to an entity., (*16)
-
Publishable, (*17)
Adds publish()/unpublish() for controlling if an Entity is "published". Uses the DateTime value object.
publish/unpublish are not implemented as they should raise events when used., (*18)
-
Stringable, (*19)
Adds __toString() and a toString() method that will use try the following methods:, (*20)
displayAs()
title()
name()
If none are present an empty string is returned., (*21)
-
Timestampable, (*22)
Adds createdAt()/updatedAt() methods. Not setters are not defined as the entity should update the
updatedAt when it is changed through update calls and not rely on database behaviour., (*23)
-
Trackable, (*24)
A collection of other interfaces: Identifiable, Nameable, Timestampable, (*25)
-
UniversallyIdentifiable, (*26)
Adds a uuid() method that returns a Uuid value object., (*27)
-
Versionable, (*28)
Adds a version() and incrementVersion() methods for defining the current entity version. incrementVersion
should be hooked in appropriate update methods when the entity is modified., (*29)