1. Go to this page and download the library: Download phpfluent/arraystorage library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phpfluent / arraystorage example snippets
use PHPFluent\ArrayStorage\Storage;
$storage = new Storage();
$storage->users; // This is a collection
$storage = new Storage();
$storage->users->insert(['name' => 'Henrique Moody']);
use PHPFluent\ArrayStorage\Record;
$storage = new Storage();
$record = new Record();
$record->name = 'Henrique Moody';
$storage->users->insert($record);
$storage = new Storage();
$record = $storage->users->record(); // You also can provide default data, like an array or stdClass
$record->name = 'Henrique Moody';
$storage->users->insert($record);
$storage = new Storage();
$storage->users->delete(['name' => 'Henrique Moody']);
$storage = new Storage();
$storage->users->delete();
$storage->users->findAll(['status !=' => false]); // Return an Collection object with the partial result (if any)
$storage->users->find(['priority >=' => 4]); // Return an Record object with the first matched result (if any) or NULL
$converter = new Converter\Arr();
$converter->convert($storage->collectionName); // Returns an array with the records as array too
$converter = new Converter\Arr(false);
$converter->convert($storage->collectionName); // Returns an array of Record objects
$converter = new Converter\Json();
$converter->convert($storage->collectionName); // Returns an string with the JSON
$converter = new Converter\Json(JSON_NUMERIC_CHECK);
$converter->convert($storage->collectionName); // Returns the JSON but encodes numeric strings as numbers
$converter = new Converter\Xml();
$converter->convert($storage->collectionName); // Returns an string with the XML
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.