entity_interface
interface entity_interface implements JsonSerializable
Interface Entity.
The base contract for all domain entities. Ensures basic identification and serialization capabilities.
Methods
int|null
get_id()
Get the entity unique identifier.
array
to_array()
Convert the entity state to a plain associative array.
Details
at line 36
int|null
get_id()
Get the entity unique identifier.
Returns null if the entity has not been persisted yet.
at line 44
array
to_array()
Convert the entity state to a plain associative array.
Useful for DTO conversion, logging, or debugging.