1. Go to this page and download the library: Download carlosv2/pocket 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/ */
carlosv2 / pocket example snippets
use carlosV2\Pocket\ValuePocket;
$pocket = new ValuePocket('/path/to/the/file', 42);
$pocket->load(); // Returns: 42
$pocket->save(4);
$pocket->load(); // Returns: 4
use carlosV2\Pocket\CollectionPocket;
$pocket = new CollectionPocket('/path/to/the/file');
$pocket->add('a');
$pocket->add(1);
$pocket->add(true);
$pocket->getValues(); // Returns: ['a', 1, true]
use carlosV2\Pocket\PocketManager;
$manager = new PocketManager('/path/to/the/folder/');
$manager->getValuePocket(); // Returns an instance of ValuePocket
$manager->getCollectionPocket(); // Returns an instance of CollectionPocket
$manager->getIndexedPocket(); // Returns an instance of IndexedPocket
$manager->clear(); // Removes any file inside /path/to/the/folder/ folder
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.