Пример #1
0
 /**
  * Fetch a session bucket
  * @param  string        $name Name of the bucket to fetch
  * @return SessionBucket Returns the bucket
  * @since 1.0-sofia
  */
 public function bucket($name)
 {
     $bucket = $this->storage->bucket($name);
     if (!$bucket) {
         $bucket = new Bucket($name);
         $bucket->load($_SESSION[$name]);
         $this->storage->register($bucket);
     }
     return $bucket;
 }