WellCommerce\Bundle\CoreBundle\Helper\Request\RequestHelper::setSessionAttribute PHP Method

setSessionAttribute() public method

public setSessionAttribute ( string $name, $value )
$name string
    public function setSessionAttribute(string $name, $value)
    {
        if (null === $this->getCurrentRequest() || false === $this->request->hasSession()) {
            throw new \LogicException('Cannot set session attributes without valid session.');
        }
        return $this->request->getSession()->set($name, $value);
    }