00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00020
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 }