public function markAsFlashdata($key): bool
	{
		if (is_array($key))
		{
			for ($i = 0, $c = count($key); $i < $c; $i ++)
			{
				if (! isset($_SESSION[$key[$i]]))
				{
					return false;
				}
			}

			$new = array_fill_keys($key, 'new');

			$_SESSION['__ci_vars'] = isset($_SESSION['__ci_vars']) ? array_merge($_SESSION['__ci_vars'], $new) : $new;

			return true;
		}

		if (! isset($_SESSION[$key]))
		{
			return false;
		}

		$_SESSION['__ci_vars'][$key] = 'new';

		return true;
	}
public function markAsFlashdata($key): bool
	{
		if (is_array($key))
		{
			for ($i = 0, $c = count($key); $i < $c; $i ++)
			{
				if (! isset($_SESSION[$key[$i]]))
				{
					return false;
				}
			}

			$new = array_fill_keys($key, 'new');

			$_SESSION['__ci_vars'] = isset($_SESSION['__ci_vars']) ? array_merge($_SESSION['__ci_vars'], $new) : $new;

			return true;
		}

		if (! isset($_SESSION[$key]))
		{
			return false;
		}

		$_SESSION['__ci_vars'][$key] = 'new';

		return true;
	}
public function markAsFlashdata ( $ key ) : bool { if ( is_array ( $ key ) ) { for ( $ i = 0 , $ c = count ( $ key ) ; $ i < $ c ; $ i ++ ) { if ( ! isset ( $ _SESSION [ $ key [ $ i ] ] ) ) { return false ; } } $ new = array_fill_keys ( $ key , 'new' ) ; $ _SESSION [ '__ci_vars' ] = isset ( $ _SESSION [ '__ci_vars' ] ) ? array_merge ( $ _SESSION [ '__ci_vars' ] , $ new ) : $ new ; return true ; } if ( ! isset ( $ _SESSION [ $ key ] ) ) { return false ; } $ _SESSION [ '__ci_vars' ] [ $ key ] = 'new' ; return true ; }
Mark a session property or properties as flashdata.

@param array|string $key Property identifier or array of them

@return boolean False if any of the properties are not already set
Mark a session property or properties as flashdata .