PHPackages                             czproject/innudb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. czproject/innudb

ActiveLibrary[Database &amp; ORM](/categories/database)

czproject/innudb
================

Experimental library for manipulation with array-based "database".

v0.9.0(12y ago)1211PHP

Since Aug 18Pushed 8y ago2 watchersCompare

[ Source](https://github.com/czproject/innudb)[ Packagist](https://packagist.org/packages/czproject/innudb)[ RSS](/packages/czproject-innudb/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

InnuDb
======

[](#innudb)

Experimental PHP library for manipulation with array-based "database".

```
$pathToFile = __DIR__ . '/data.php'; // see file content below
$loader = new Cz\InnuDb\Loader;
$innudb = new Cz\InnuDb\InnuDb($loader, $pathToFile);

$persons = $innudb->createCollection('persons');

foreach($persons as $id => $item)
{
	var_dump($item);
}

// $persons->getCount();
//
// $persons->limit(limit);
// $persons->limit(limit, offset);
//
// $persons->sort('column'); // ASC is default
// $persons->sort('column', 'ASC'); // or order('column')
// $persons->sort('column', 'DESC'); // ASC is default
// $persons->sort(array(
//     'column' => 'ASC', // or 'DESC'
// ));
// $persons->sort('name')->sort('age', 'DESC'); // fluent interface
//
// $persons->where('column', 'value'); // column = value
// $persons->where('column >', 'value'); // column > value
// $persons->where('column ', 'value2'); // fluent interface: column = value AND column2 > value2
// $persons->where(array(
//     'column' => 'value', // column = value
//     'column2
