Set Flash Data

Set flash data that will persist only until next request
@param mixed  $newdata Flash data array or string (key)
@param string $value   Value for single key
348463
public function setFlashData($newdata, $value = '')
    {
        if (is_string($newdata)) {
            $newdata = [$newdata => $value];
        }

        if (!empty($newdata)) {
            foreach ($newdata as $key => $val) {
                $this->newFlashData[$key] = $val;
            }
        }
    }
1192753
public static function set($data, $value = null)
    {
        static::init();

        # Check that at least one value has been changed before starting up the sesson
        $changed = false;
        if (is_array($data)) {
            foreach ($data as $key => $val) {
                if (static::get($key) !== $val) {
                    $changed = true;
                    break;
                }
            }
        } else {
            if (static::get($data) !== $value) {
                $changed = true;
            }
        }

        # If none of the values have changed then don't write to session data
        if (!$changed) {
            return;
        }

        /**
         * Whenever a key is set, we need to start the session up again to store it
         * When session_start is called it attempts to send the cookie to the browser with the session id in.
         * However if some output has already been sent then this will fail, this is why we suppress errors on the call here
         */
        @session_start();

        if (is_array($data)) {
            foreach ($data as $key => $val) {
                $_SESSION[$key] = $val;
            }
        } else {
            $_SESSION[$data] = $value;
        }

        static::$data = $_SESSION;

        session_write_close();
    }
633827
public function SetData($Key, $Value = NULL, $AddProperty = FALSE) {
      if (is_array($Key)) {
         $this->Data = array_merge($this->Data, $Key);

         if ($AddProperty === TRUE) {
            foreach ($Key as $Name => $Value) {
               $this->$Name = $Value;
            }
         }
         return;
      }

      $this->Data[$Key] = $Value;
      if($AddProperty === TRUE) {
         $this->$Key = $Value;
      }
      return $Value;
   }
1026260
protected function addData($name, $value)
    {
        if (!empty($name)) {
            if (is_array($value)) {
                $this->dataDocument->addArray(self::DATA_PATH_ROOT, $value, $name);
            } elseif ($value instanceof DOMNodeList) {
                $this->dataDocument->copyNodes(self::DATA_PATH_ROOT, $value);
            } elseif ($value instanceof Library\Dom) {
                $this->dataDocument->copyNodes(self::DATA_PATH_ROOT, $value->getNodes('/'));
            } elseif (is_object($value)) {
                $this->dataDocument->addObject(self::DATA_PATH_ROOT, $value, $name);
            } else {
                $this->dataDocument->addNode(self::DATA_PATH_ROOT, $name, $value);
            }
        }
    }
280540
public function setData($data)
    {
        $this->valid = false;
        $this->hash = md5($data, false);
        $this->rawData = explode("\n", $data);
    }
1296344
public function setData($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $key => $value) {
                if (!is_array($value) && !is_object($value)) {
                    $value = $this->stripInvalidUnicodeSequences(
                        $this->stringToUtf8(
                            $value,
                            ShopgateObject::$sourceEncodings
                        )
                    );
                }
                $this->$key = $value;
            }
        } else {
            if (!is_array($value) && !is_object($value)) {
                if (!is_null($value)) {
                    $value = $this->stripInvalidUnicodeSequences(
                        $this->stringToUtf8(
                            $value,
                            ShopgateObject::$sourceEncodings
                        )
                    );
                }
            }
            $this->$key = $value;
        }

        return $this;
    }
234697
public function setValue($value, $data = null)
    {
        if ($data instanceof DataObject) {
            $this->loadFrom($data);
            return $this;
        }
        
        return parent::setValue($value);
    }
1338860
public function setValue($value, $data = null)
    {
        $value = $this->preventHtmlParserError($value);
        return parent::setValue($value, $data);
    }
88877
public function set(string $key, $value)
    {
        if (!is_array($value)) {
            $value = [$value];
        }
        $this->data[$key] = $value;
    }
322145
protected function putData(array $newData)
    {
        // opening up the file, and creating an exclusive lock
        $handle = fopen($this->locksFile, 'a+');
        flock($handle, LOCK_EX);

        // We can only truncate and rewind once the lock is acquired.
        ftruncate($handle, 0);
        rewind($handle);

        fwrite($handle, serialize($newData));
        flock($handle, LOCK_UN);
        fclose($handle);
    }
547244
protected function setData($key, $value)
    {
        $this->data[$key] = (is_array($value)) ? $value : [$value];
    }
88566
public function set($key, $value)
    {
        $this->initialize();

        $ids = explode('.', $key);
        $base = &$this->data;

        while ($current = array_shift($ids)) {
            if (is_array($base) && array_key_exists($current, $base)) {
                $base = &$base[$current];
            } else {
                $base[$current] = [];
                $base = &$base[$current];
            }
        }

        $base = $value;
        $this->session->set($this->name, $this->data);
    }
944036
public function flash($name, $value) {
        $this->set($name, $value);
        if (!$this->has('__flash__.__time__')) {
            $this->set('__flash__.__time__', $_SERVER['REQUEST_TIME_FLOAT']);
        }
        $this->push('__flash__', $name);
    }
915440
public function setFlashVar($key, $value) {
        $this->flashVar[$key] = $value;
        $this->set($key, $value);
    }
1124628
public function flash($key, $value)
    {
        $_SESSION[$this->config['key']]['flash'][$key] = $value;
        $this->flash[$key] = $value;
    }
981668
public function SetValue($FieldName, $Value) {
      if (!is_array($this->_DataArray))
         $this->_DataArray = array();
      
      $this->_DataArray[$FieldName] = $Value;
   }
566734
function setTransp( $value, $params=FALSE ) {
    $this->transp['value']  = $value;
    $this->transp['params'] = $this->_setParams( $params );
  }