Skip to content
Francesco Bianco edited this page Oct 13, 2017 · 2 revisions
<?php
// library namespace 
use Javanile\Moldable\Storable;

// define ORM class-model
class Customer extends Storable 
{
    public $id = self::PRIMARY_KEY;
    public $name = '';
}

// instance empty object
// database tables and fields are automatic generated 
// or updated if change Customer class
$customer = new Customer();

// assign values
$customer->name = 'Franky Franco';

// now object persist on DB
$customer->store();