neat-php / object

Neat Object components
MIT License
4 stars 1 forks source link

Load method #5

Closed annavanbiemen closed 5 years ago

annavanbiemen commented 5 years ago

Both the Repository and the Storage trait should have a load() method. This method should:

  1. check if a primary key is set;
  2. when set, find a matching row in the database;
  3. when found, load the row using fromArray().