$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.
Requires php 7.4, php 8.0, or later.
ICU support requires the intl
extension.
Recommended installation method is via Composer: simply composer require php-enspired/storable
.
<?php
$parties = $storage->get(Party::class)
->find()
->upcoming()
->scheduledThisWeek()
->noInvitationRequired()
->withCake()
->list();
foreach ($parties as $party) {
$party->on();
}
see more in the wiki.
coming soon
I'm on Freenode at #php-enspired
, or open an issue on github. Feedback is welcomed as well.