maertien/liteorm

Lightweight, really simple and easy to use PHP ORM for SQLite3

Installs: 33

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/maertien/liteorm

v1.0 2017-08-29 14:53 UTC

This package is not auto-updated.

Last update: 2025-10-26 09:54:01 UTC


README

Lightweight, really simple and easy to use PHP ORM for SQLite3

License

GNU GPL version 2

Author

Martin Kumst - http://kumst.net

Howto use LiteORM

<?php

// Load LiteORM classes as simple as 
require_once "../src/LiteORM.php";

// Specify database filename
define("LITEORM_DB_FILE", "./test.sqlite");

// Create database structure as simple as
class Man extends LiteORMDataObject {
}
$man = new Man(array("age" => 20, "name" => "Martin"));
$man->createTable();

// Insert object
$man->save();

// Get some property value
echo $man->get("age");

// Modify and save object
$man->set("age", 22);
$man->save();

// For more examples please take a look at tests/test_sqlite.php file