Kraken\Network\Http\Component\Session\HttpSession::__construct PHP Метод

__construct() публичный Метод

public __construct ( Kraken\Network\NetworkComponentAwareInterface $aware = null, Kraken\Network\NetworkComponentInterface $component = null, SessionHandlerInterface $handler = null, string[] $options = [], Ratchet\Session\Serialize\HandlerInterface $serializer = null )
$aware Kraken\Network\NetworkComponentAwareInterface
$component Kraken\Network\NetworkComponentInterface
$handler SessionHandlerInterface
$options string[]
$serializer Ratchet\Session\Serialize\HandlerInterface
    public function __construct(NetworkComponentAwareInterface $aware = null, NetworkComponentInterface $component = null, SessionHandlerInterface $handler = null, $options = [], HandlerInterface $serializer = null)
    {
        $this->component = $component;
        $this->handler = $handler !== null ? $handler : new NullSessionHandler();
        $this->nullHandler = new NullSessionHandler();
        ini_set('session.auto_start', 0);
        ini_set('session.cache_limiter', '');
        ini_set('session.use_cookies', 0);
        $this->setOptions($options);
        if ($serializer === null) {
            $serialClass = "\\Ratchet\\Session\\Serialize\\{$this->toClassCase(ini_get('session.serialize_handler'))}Handler";
            if (!class_exists($serialClass)) {
                throw new RuntimeException('Unable to parse session serialize handler.');
            }
            $serializer = new $serialClass();
        }
        $this->serializer = $serializer;
        if ($aware !== null) {
            $aware->setComponent($this);
        }
    }