2017 © Pedro Peláez
 

project orm

Just a file based database using object relational mapping.

image

roksta/orm

Just a file based database using object relational mapping.

  • Wednesday, December 28, 2016
  • by roksta
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

1. create a user and set attributes individually

$user_1 = new User();
$user_1->name = 'Samson';
$user_1->age = '24';
$user_1->save();

2. Create a user and save

$user_2 = User::create([
    'name' => 'Peter',
    'age' => '22'
]);

Fetch data from the saved database

$user_found = User::find(2);

$user_search = user::search(['name' => 'peter']);

$user_found->update(['name' => 'susan']);

$user_found->delete();

Define a primary key for a model

use ORM\ORM;

class Model extends ORM
{
    const PRIMARY = 'primary_key';
}

or the default key will default to id, (*1)

The Versions

28/12 2016

dev-master

9999999-dev

Just a file based database using object relational mapping.

  Sources   Download

MIT

The Requires

 

28/12 2016

1

1.0.0.0

Just a file based database using object relational mapping.

  Sources   Download

MIT

The Requires