Login   Register  
PHP Classes
elePHPant
Icontem

File: demo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Thiago Luiz Alves  >  Super Globals Access Interface  >  demo.php  >  Download  
File: demo.php
Role: Example script
Content type: text/plain
Description: Example using this package
Class: Super Globals Access Interface
Access array super-global variables using a path
Author: By
Last change: Changed the file name
Date: 3 years ago
Size: 683 bytes
 

Contents

Class file image Download
<?php


require_once 'Globals.php';
require_once 
'Session.php';

$session Session::getInstance();

//writing a data

$session->write('User.Permission.View'1);

echo 
"<pre>";
print_r($_SESSION);
echo 
"</pre>";

$data $session->read('User');

echo 
"<pre>";
print_r($data);
echo 
"</pre>";


//Seching for data in array
if($session->search(1,'User.Permission')){
    echo 
"<br> 1 Found ";
}
else{
    echo 
"<br> 1 not found ";    
}

//Checking if index exists

if($session->exists('Auth.User')){
    echo 
"<br> User authenticated ";
}
else{
    echo 
"<br> User not authenticated ";    
}

//Destrying all data
$session->destroyAll();

?>