Set a current session flash parameter

@param mixed $value
@param string $index
@return self
423983
public function setFlash($value, $index = null)
    {
        if ( ! $this->isOpened()) {
            $this->start();
        }
        if (!empty($index)) {
            $this->flashes[$index] = $value;
        } else {
            $this->flashes[] = $value;
        }
        return $this;
    }
681110
public function set($value = null)
    {
        //get args
        $args = func_get_args();
        
        if (count($args) < 2) {
            return $this;
        }
        
        $value = array_pop($args);
        $last = array_pop($args);
        
        $pointer = &$this->data;
        foreach ($args as $i => $step) {
            if (!isset($pointer[$step])
                || !is_array($pointer[$step])
            ) {
                $pointer[$step] = array();
            }

            $pointer = &$pointer[$step];
        }
        
        $pointer[$last] = $value;
        
        return $this;
    }
891548
public function offsetSet($index, $value)
	{
		if ( ! $value instanceof StreamInterface)
		{
			throw new TranscoderException(sprintf('The new value must be an instance of %s', StreamInterface::class));
		}
		
		$this->streams[$index ?: $this->count()] = $value;
		
		return $this;
	}
1008539
public function setCurrent($value)
    {
        if (StaticValidator::validates('number', $value)) {
            $this->current = StaticFilter::filter('number',$value);
            $this->offset = $this->rowsPerPage * ($this->current - 1);
        }
        return $this;
    }
2977
public function set($index, $value) : Vector
    {
        $values = $this->_set($index, $value, true);
        $this->setValues($values);
        return $this;
    }
438683
public function setTtsParam($value)
    {
        if (is_array($value)) {
            $value = Support::jsonStr($value);
        }

        $this->params['tts_param'] = $value;

        return $this;
    }
525245
public function flash($key, $value = true)
    {
        if (is_array($key))
            $this->flashMany($key);
        else
            $this->session->flash($key, $value);
    }
769349
public function offsetSet($index, $value) {
		if( is_null($index) ){
			$this->results[] = $value;
			return;
		}
		$this->results[$index] = $value;
	}
1224348
public function withTransversal($index, $value)
    {
        $res = clone $this;

        $res->transversals = $this->insertInList($res->transversals, $index, $value);

        return $res;
    }
101057
public function update(Expression $value, Expression $index = null)
    {
        if ($this->value === $value && $this->index === $index) {
            return $this;
        }

        return new self($value, $index);
    }
643152
final public function offsetSet($index, $value): void
    {
        if (is_null($index)) {
            throw CannotAlterCollection::byAddingTo($this);
        }
        throw CannotAlterCollection::byOverWriting($this, $index);
    }
1124628
public function flash($key, $value)
    {
        $_SESSION[$this->config['key']]['flash'][$key] = $value;
        $this->flash[$key] = $value;
    }
529755
public function offsetSet($index, $value)
    {
        if (!($value instanceof Translation)) {
            throw new InvalidArgumentException(
                'Only instances of Gettext\\Translation must be added to a Gettext\\Translations'
            );
        }

        $id = $value->getId();

        if ($this->offsetExists($id)) {
            $this[$id]->mergeWith($value);

            return $this[$id];
        }

        parent::offsetSet($id, $value);

        return $value;
    }
59245
public function setId($index): self
    {
        \assert($index === null || \is_int($index) === true || \is_string($index) === true);

        $this->index = $index;

        return $this;
    }
977027
public function set($data, $value = null)
    {
        //argument 1 must be a string or array
        Argument::i()->test(1, 'array', 'string');

        if (!self::$session) {
            Exception::i()->setMessage(self::ERROR_NOT_STARTED)->trigger();
        }

        if (is_array($data)) {
            $_SESSION = $data;
            return $this;
        }

        $_SESSION[$data] = $value;

        return $this;
    }
1123571
public static function flash($key, $value = null)
    {
        if ($value === null) {
            $result = static::get($key);
            static::remove($key);
            return $result;
        } else {
            static::set($key, $value);
        }
    }
838784
public function set($index, $newValue) {
        if (!$this->offsetSet($index, $newValue)) {
            $this->append($newValue);
        }

        return $this;
    }