/storable

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

Be a Storage Hero

$entity->saveYourself() // zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $storage->i’llSaveYou($entity) // hero!

Storable provides a design and groundwork that you can build from while keeping the Database (or whatever storage) away from your domain logic.

dependencies

Requires php 7.4, php 8.0, or later.

ICU support requires the intl extension.

installation

Recommended installation method is via Composer: simply composer require php-enspired/storable.

a quick taste

<?php

$parties = $storage->get(Party::class)
  ->find()
  ->upcoming()
  ->scheduledThisWeek()
  ->noInvitationRequired()
  ->withCake()
  ->list();

foreach ($parties as $party) {
  $party->on();
}

see more in the wiki.

docs

coming soon

contributing or getting help

I'm on Freenode at #php-enspired, or open an issue on github. Feedback is welcomed as well.