<?php
 
/**
 
 *  @package storage
 
 *  @author Domenico Pontari <[email protected]>
 
 *  @copyright Copyright (c) 2009, Domenico Pontari
 
 *  @license http://opensource.org/licenses/bsd-license.php New and Simplified BSD licenses
 
 *  @version 1.0
 
 *
 
 *  This example uses jsonStorage class to store $myVar in 'data_example' folder
 
 *  and it displays another variable stored in 'storedVar' file
 
 *
 
 *  YOU NEED JSON PHP MODULE TO RUN THIS EXAMPLE
 
 */
 
 
    require_once ('storage_json.php');
 
    $myVar = array ('tryIt' => true, 'format' => 'json');
 
 
    $storage = new jsonStorage ('data_example');
 
    $storage->setObj ('myVar', $myVar);
 
    $storedVar = $storage->getObj ('storedVar');
 
    echo 'Dump for storedVar: ';
 
    var_dump ($storedVar);
 
?>
 
 |