To work with the Cycle Active Record, you need to define entities that extend the ActiveRecord class. There are two common approaches to defining entities: the strict approach and the fluent approach.
These approaches will be used as main examples across documentation to demonstrate various aspects of the library.
Strict Approach:
In the strict approach, you define your entity with private properties and provide public getter and setter methods to access and modify the properties. This approach encapsulates the entity's internal state and provides better control over how the properties are accessed and modified.
In the fluent approach, you define your entity with public properties, allowing direct access to the properties without the need for explicit getter and setter methods. This approach leads to more concise and readable code, especially when dealing with simple entities.