/data-mapper-design-pattern-sample

Implementation of simple data mapper design pattern in PHP. It uses external API and mapped the data in to the in-memory class object.

Primary LanguagePHP

Data Mapper Design Pattern in PHP

  • It transfers the data between persistent layer and in memory layer.
  • It keeps the in memory layer and the persistent data layer independent of each other.

Persistance Layers

In memory Layers

User {
    getId
    getEmail
}

Mapper

We will implement UserMapper class in order to map external api data in to User class and vise versa.

YouTube link

https://youtu.be/oaiwS5KFHEs