Вход Регистрация
Файл: vendor/laravel/framework/src/Illuminate/Session/SymfonySessionDecorator.php
Строк: 169
<?php

namespace IlluminateSession;

use 
BadMethodCallException;
use 
IlluminateContractsSessionSession;
use 
SymfonyComponentHttpFoundationSessionSessionBagInterface;
use 
SymfonyComponentHttpFoundationSessionSessionInterface;
use 
SymfonyComponentHttpFoundationSessionStorageMetadataBag;

class 
SymfonySessionDecorator implements SessionInterface
{
    
/**
     * The underlying Laravel session store.
     *
     * @var IlluminateSessionStore
     */
    
protected $store;

    
/**
     * Create a new session decorator.
     *
     * @param  IlluminateContractsSessionSession  $store
     * @return void
     */
    
public function __construct(Session $store)
    {
        
$this->store $store;
    }

    
/**
     * {@inheritdoc}
     */
    
public function start(): bool
    
{
        return 
$this->store->start();
    }

    
/**
     * {@inheritdoc}
     */
    
public function getId(): string
    
{
        return 
$this->store->getId();
    }

    
/**
     * {@inheritdoc}
     *
     * @return void
     */
    
public function setId(string $id)
    {
        
$this->store->setId($id);
    }

    
/**
     * {@inheritdoc}
     */
    
public function getName(): string
    
{
        return 
$this->store->getName();
    }

    
/**
     * {@inheritdoc}
     *
     * @return void
     */
    
public function setName(string $name)
    {
        
$this->store->setName($name);
    }

    
/**
     * {@inheritdoc}
     */
    
public function invalidate(?int $lifetime null): bool
    
{
        
$this->store->invalidate();

        return 
true;
    }

    
/**
     * {@inheritdoc}
     */
    
public function migrate(bool $destroy false, ?int $lifetime null): bool
    
{
        
$this->store->migrate($destroy);

        return 
true;
    }

    
/**
     * {@inheritdoc}
     *
     * @return void
     */
    
public function save()
    {
        
$this->store->save();
    }

    
/**
     * {@inheritdoc}
     */
    
public function has(string $name): bool
    
{
        return 
$this->store->has($name);
    }

    
/**
     * {@inheritdoc}
     */
    
public function get(string $namemixed $default null): mixed
    
{
        return 
$this->store->get($name$default);
    }

    
/**
     * {@inheritdoc}
     *
     * @return void
     */
    
public function set(string $namemixed $value)
    {
        
$this->store->put($name$value);
    }

    
/**
     * {@inheritdoc}
     */
    
public function all(): array
    {
        return 
$this->store->all();
    }

    
/**
     * {@inheritdoc}
     *
     * @return void
     */
    
public function replace(array $attributes)
    {
        
$this->store->replace($attributes);
    }

    
/**
     * {@inheritdoc}
     */
    
public function remove(string $name): mixed
    
{
        return 
$this->store->remove($name);
    }

    
/**
     * {@inheritdoc}
     *
     * @return void
     */
    
public function clear()
    {
        
$this->store->flush();
    }

    
/**
     * {@inheritdoc}
     */
    
public function isStarted(): bool
    
{
        return 
$this->store->isStarted();
    }

    
/**
     * {@inheritdoc}
     *
     * @return void
     */
    
public function registerBag(SessionBagInterface $bag)
    {
        throw new 
BadMethodCallException('Method not implemented by Laravel.');
    }

    
/**
     * {@inheritdoc}
     */
    
public function getBag(string $name): SessionBagInterface
    
{
        throw new 
BadMethodCallException('Method not implemented by Laravel.');
    }

    
/**
     * {@inheritdoc}
     */
    
public function getMetadataBag(): MetadataBag
    
{
        throw new 
BadMethodCallException('Method not implemented by Laravel.');
    }
}
Онлайн: 0
Реклама