Data Access for PHP. Stupid. Simple. Fast.

Amiss is a Data Mapper and Active Record implementation for MySQL and PHP 5.3 or greater.

Amiss does not try to be a fully-fledged ORM that cooks you breakfast, walks the dog and gives your schema its daily back massage, it only tries to take the monotony and repetition out of retrieving simple objects and simple relationships from a database that already exists.

It's not the fanciest ORM on the block, but its brutal simplicity may make it a better candidate for your next throwaway project or prototype than PHP's premier ORM behemoth Doctrine, the dated interface of Propel, or the tight coupling of your favourite framework's own model layer.

It is unapologetic about being stupid, simple and fast.

Latest supported versions:

Amiss 5 should be used for all new projects, Amiss 4 will be supported indefinitely - it's simply not used widely enough for that to be a burden!

Amiss features:

At a glance:

See the overview for a more thorough glance at all of the major features.

require 'vendor/autoload.php';

$connector = new PDOK\Connector('mysql:host=', 'user', 'password');
$manager = Amiss\Sql\Factory::createManager($connector);

class Event
    /** :amiss = {"field": {"primary": true}}; */
    public $eventId;
    /** :amiss = {"field": true}; */
    public $venueId;
    /** :amiss = {"field": true}; */
    public $name;
    /** :amiss = {"has": {"type": "one", "of": "Venue", "from": "venueId"}}; */
    public $venue;

$event = new Event();
$event->name = "Foo Bar";

$event = $manager->getById('Event', 1);
$event = $manager->get('Event', '{name}=?', 'Foo Bar');
$events = $manager->getList('Event');

"Ok, why not. How do I dive in?"

  1. Download the source code
  2. Read the documentation
  3. ???
  4. Enjoy