Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Vit Ek  >  Object Session Saver  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Object Session Saver
Save and restore objects in session variables
Author: By
Last change:
Date: 7 years ago
Size: 648 bytes
 

Contents

Class file image Download
<?php
/**
 * including of the interface
 */
require_once(dirname(__FILE__)."/SessionObject.php");

/**
 * including of the SessionSaver class
 */
require_once(dirname(__FILE__)."/SessionSaver.php");

/**
 * including of the ExampleClass class
 */
require_once(dirname(__FILE__)."/ExampleClass.php");


$objectsForSaving = array("ExampleClass");
SessionSaver::addObjects($objectsForSaving);
if (empty(
$_SESSION)) {
    
session_start();
}

SessionSaver::restoreObjects();

$testclass = new ExampleClass();
$testclass->printMyInfo();

SessionSaver::saveObjects();

?>


  <a href="example.php">Load this page again</a>