Fork me on GitHub

Architecture

Orm is clearly designed to abstract entities from database implementation, therefore it separates your model into three basic layers:

  • Entities

    Entities are data crates, hold your data, validate values and provide API for value encapsulation, e.g. for relationships.

  • Repositories

    Repositories form a layer which takes care about your entities. Repositories manage entities and provide an API for thier retreiving, filtering and persiting.

  • Mappers

    Mappers are the backend of the whole Orm. The Mapper provides interaction with the database layer. Orm comes compatible with Nextras\Dbal database library.

Everything is connected in the central Model. Each entity must have defined own repository and mapper.