I needed a no-sql solution for small projects without the need of a full MongoDb server.This is the result, a no-sql solution based on sqlite: $client = new MongoLite\Client(PATH_TO_WRITABLE_FOLDER);
$database = $client->testdb;
$collection = $database->products;
$entry = ["name"=>"Super cool Product", "price"=>20];
$collection->insert($entry);
$products = $collection->find(); // Get Cursor
if ($products->count()) {
foreach($products->sort(["price"=>1])->limit(5) as $product) {
var_dump($product);
}
}
More information + SourceCode: @Github