gm314/siesta

PHP 7 ORM Library

1.5.5 2024-04-14 15:30 UTC

README

License Latest Stable Version Total Downloads Latest Unstable Version

Stored procedure based ORM for PHP 7.

Documentation

For full documentation, please visit https://gperler.github.io

Installation with composer

composer require gm314/siesta

Example

In this example we create an Artist and Label entity, and configure the relationship between them:

$artist = new Artist();
$artist->setName("Jamie Woon");

$label = new Label();
$label->setName("PMR");
$label->setCity("London");
$label->addToArtistList($artist);

// save with cascade. will store both label and artist
$label->save(true);

Console Commands

create config file

vendor/bin/siesta init

generate entities

vendor/bin/siesta gen

reverse engineer

vendor/bin/siesta reverse

Testing

configure your database settings in tests/siesta.test.mysql.config.json

vendor/bin/codecept run