PEIP_Sealer.php

Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  * This file is part of the PEIP package.
00005  * (c) 2010 Timo Michna <timomichna/yahoo.de>
00006  * 
00007  * For the full copyright and license information, please view the LICENSE
00008  * file that was distributed with this source code.
00009  */
00010 
00020 // PHP5.3
00021 
00022 class PEIP_Sealer implements PEIP_INF_Sealer, PEIP_INF_Unsealer{
00023 
00024     protected $store;
00025     
00026     
00032     public function __construct(SplObjectStorage $store = NULL){
00033         $this->store = (bool)$store ? $store : new SplObjectStorage;    
00034     }   
00035     
00036     
00043     public function seal($value, $box = false){
00044         $box = (bool)$box ? $box : new stdClass;
00045         $this->store[$box] = $value;        
00046         return $box;
00047     }
00048 
00049     
00055     public function unseal($box){
00056         return $this->store[$box];
00057     }
00058 }

Generated on Mon Apr 12 11:39:00 2010 for PEIP by  doxygen 1.5.1