2017 © Pedro Peláez
 

library orm

image

assouan/orm

  • Saturday, April 23, 2016
  • by Assouan
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ORM - PHP Library

, (*1)

ORM., (*2)

Installation

Install using composer:, (*3)

$ composer require assouan/orm

Usage

orm($table, $database, $connection);

Example

$pdo = new \PDO
(
    'mysql:host=localhost;port=3306;charset=UTF8',
    'root',
    '',
    array
    (
        \PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'',
        \PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
    )
);

ORM::setDefaultConnection($pdo);
ORM::setDefaultDatabase('user');
ORM::setDefaultTable('account');

foreach (orm()->selects() as $account)
{
    echo $account->email.'<br />';

    $profile = orm('account_profile')->selectById( $account->id );
    echo $profile->first_name.' '.$profile->last_name.'<hr />';
}

The Versions

23/04 2016

dev-master

9999999-dev

  Sources   Download

The Requires

  • php ^7.0