2017 © Pedro Peláez
 

library xpdo

image

xpdo/xpdo

  • Thursday, August 2, 2018
  • by ianbrind
  • Repository
  • 19 Watchers
  • 58 Stars
  • 3,426 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 45 Forks
  • 50 Open issues
  • 6 Versions
  • 19 % Grown

The README.md

xPDO O/RB v3

Build Status, (*1)

xPDO is an ultra-light object-relational bridge library for PHP. It is a standalone library and can be used with any framework or DI container., (*2)

Installation

xPDO can be installed in your project via composer:, (*3)

composer require xpdo/xpdo

Usage

The \xPDO\xPDO class is the main point of access to the framework. Provide a configuration array describing the connection(s) you want to establish when creating an instance of the class., (*4)

require __DIR__ . '/../vendor/autoload.php';

$xpdoMySQL = \xPDO\xPDO::getInstance('aMySQLDatabase', [
    \xPDO\xPDO::OPT_CACHE_PATH => __DIR__ . '/../cache/',
    \xPDO\xPDO::OPT_HYDRATE_FIELDS => true,
    \xPDO\xPDO::OPT_HYDRATE_RELATED_OBJECTS => true,
    \xPDO\xPDO::OPT_HYDRATE_ADHOC_FIELDS => true,
    \xPDO\xPDO::OPT_CONNECTIONS => [
        [
            'dsn' => 'mysql:host=localhost;dbname=xpdotest;charset=utf8',
            'username' => 'test',
            'password' => 'test',
            'options' => [
                \xPDO\xPDO::OPT_CONN_MUTABLE => true,
            ],
            'driverOptions' => [],
        ],
    ],
]);

$xpdoSQLite = \xPDO\xPDO::getInstance('aSQLiteDatabase', [
    \xPDO\xPDO::OPT_CACHE_PATH => __DIR__ . '/../cache/',
    \xPDO\xPDO::OPT_HYDRATE_FIELDS => true,
    \xPDO\xPDO::OPT_HYDRATE_RELATED_OBJECTS => true,
    \xPDO\xPDO::OPT_HYDRATE_ADHOC_FIELDS => true,
    \xPDO\xPDO::OPT_CONNECTIONS => [
        [
            'dsn' => 'sqlite:path/to/a/database',
            'username' => '',
            'password' => '',
            'options' => [
                \xPDO\xPDO::OPT_CONN_MUTABLE => true,
            ],
            'driverOptions' => [],
        ],
    ],
]);

The Versions

02/08 2018

2.4.x-dev

2.4.9999999.9999999-dev

  Sources   Download

15/06 2018

3.x-dev

3.9999999.9999999.9999999-dev http://www.xpdo.org/

A PDO-based Object/Relational Bridge Library

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

07/03 2018

v2.5.1-pl

2.5.1.0-patch

  Sources   Download

07/03 2018

v2.5.2-pl

2.5.2.0-patch

  Sources   Download

07/03 2018

v2.5.3-pl

2.5.3.0-patch

  Sources   Download

11/09 2015

dev-develop

dev-develop http://www.xpdo.org/

A PDO-based Object/Relational Bridge Library

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.3.0

 

The Development Requires