{@inheritdoc}

@see CoreBlockController::save()
969005
public function save($args)
    {
        $normalized = $this->normalizeArgs(is_array($args) ? $args : []);
        if (!is_array($normalized)) {
            throw new Exception(implode("\n", $normalized->getList()));
        }
        parent::save($normalized);
    }
485534
public function save($object)
    {

        if (is_array($object)) {
            $objectData = $object;
            if ($object['id'] > 0) {
                $object = $this->find($object['id']);
            } else {
                $object = new Navigation();
                $site = $this->siteManager->find($objectData['site']);
                $object->setSite($site);
            }
            if (isset($objectData['site'])) {
                unset($objectData['site']);
            }
            $this->assignArrayToObject($object, $objectData);
        } else if (!($object instanceof Navigation)) {
            $this->addErrorMessage(self::ERROR_WRONG_OBJECT);
        }

        if (!$this->hasError()) {
            $check = $this->navigationManager->save($object);
            if ($check) {
                $this->addSuccessMessage(self::SUCCESS_SAVED);
                return $object;
            }
        }
        return null;
    }
1113762
public function save($object)
    {

        if (is_array($object)) {
            $objectData = $object;
            $newPassword = "";
            if (isset($object['id']) && $object['id'] > 0) {
                $object = $this->find($object['id']);
            } else {
                $object = new User();
            }
            if (isset($objectData['password'])) {
                $newPassword = $objectData['password'];
            }
            if (isset($objectData['enabled']) && $objectData['enabled']) {
                $object->enable();
            } else {
                $object->disable();
            }
            unset($objectData['enabled']);
            if (isset($objectData['groups'])) {
                $groups = $objectData['groups'];
                $groups = array_unique($groups);
                $object->setGroups(array());
                foreach ($groups as $groupId) {
                    $group = $this->groupManager->find($groupId);
                    $object->addGroup($group);
                }
                unset($objectData['groups']);
            }
            $this->assignArrayToObject($object, $objectData);
        } else if (!($object instanceof UserInterface)) {
            $this->addErrorMessage(self::ERROR_WRONG_OBJECT);
        }

        if (!$this->hasError()) {
            if (!empty($newPassword)) {
                $check = $this->userManager->changeUserPassword($object, $newPassword);
                if ($check !== true) {
                    foreach ($check as $pwError) {
                        $this->addErrorMessage($pwError);
                    }
                    $check = false;
                }
            } else {
                $check = $this->userManager->updateUser($object);
            }
            if ($check === true) {
                $this->addSuccessMessage(self::SUCCESS_SAVED);
            }
        }

        return $object;
    }
377092
public function save($options = [])
    {
        if (!isset($options['except'])) {
            $options['except'] = [];
        }

        $options['except'] = array_merge($options['except'], $this->readOnly);

        if (!$this->exists) {
            return $this->create($options);
        }

        return $this->update($options);
    }
571567
public function save()
    {
        $aModule = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aModules");

        $aModules = [];
        if ($tmp = json_decode($aModule, true)) {
            foreach ($tmp as $key => $value) {
                $sanitizedKey = str_replace(self::BACKSLASH_REPLACEMENT, "\\", $key);
                $aModules[$sanitizedKey] = $value;
            }
            $oModuleInstaller = oxNew(\OxidEsales\Eshop\Core\Module\ModuleInstaller::class);
            $aModules = $oModuleInstaller->buildModuleChains($aModules);
        }

        \OxidEsales\Eshop\Core\Registry::getConfig()->saveShopConfVar("aarr", "aModules", $aModules);
    }
136233
public function save($object)
    {

        if (is_array($object)) {
            $objectData = $object;
            if (isset($object['id']) && $object['id'] > 0) {
                $object = $this->find($object['id']);
            } else {
                $object = new Forum();
            }
            if (isset($objectData['parent'])) {
                $parent = $this->find($objectData['parent']);
                if ($parent) {
                    $object->setParent($parent);
                }
                unset($objectData['parent']);
            }
            $this->assignArrayToObject($object, $objectData);
        } else if (!($object instanceof Forum)) {
            $this->addErrorMessage(self::ERROR_WRONG_OBJECT);
        }

        if (!$this->hasError()) {
            $check = $this->forumManager->update($object);
            if ($check === true) {
                $this->addSuccessMessage(self::SUCCESS_SAVED);
            }
        }

        return $object;
    }
147752
public function save($options)
    {
        $gcc = get_called_class();
        $class = $gcc::init();
        $cap = $this->_database->getCapsule();
        $params = (array) $options;
        $this->filter($params);

        return $cap->table($this->table)->update($params);
    }
1060550
public function save(array $options = [])
    {
        $ignored    = config('antares/ui-components::defaults.ignored', []);
        $this->data = array_except((array) $this->data, $ignored);

        return parent::save();
    }
96248
function save()
    {
        $file = $this->_getFilePath();

        $data = $this->data;
        $data = $this->getDataInterchange()->makeForward($data);
        $dataStr = "<?php\n". "return " . var_export($data, true) . ";\n";

        ErrorStack::handleError(E_ALL);
        ##  \\\\\
        ### check for directory tree
        $dirPath = dirname($file);
        if (! file_exists($dirPath) )
            if ( false === mkdir($dirPath, 0777, true) )
                throw new \RuntimeException(sprintf('Cant create store directory on (%s).', $dirPath));

        file_put_contents($file, $dataStr, LOCK_EX);
        ##  /////
        if ($exception = ErrorStack::handleDone())
            throw $exception;

        $this->_setState(self::$STATE_OK);
        return $this;
    }
712581
private function _save() : void
    {
        $this->_storage->save(
            $this->_host,
            $this->_storageKey,
            $this->_requestCount,
            $this->_timekeeper->getExpiration(),
            $this->getRemainingSeconds()
        );
    }
116657
public function save()
	{
		// Bind the rules as appropriate.
		if (is_array($this->get('rules')))
		{
			$this->set('rules', json_encode($this->get('rules')));
		}

		return parent::save();
	}
1222246
public function save(){
    $table  = static::persistenceOptions('table');
    $op     = static::persistenceOptions();
    $cb     = static::persistenceSave();

    // Use standard persistence on DB layer
    $cb = $cb ? Closure::bind($cb, $this) : [$this,'persistenceSaveDefault'];
    return $cb($table,$op);
  }
61095
public function save(): void
    {
        try {
            $this->em->flush();
        } catch (OptimisticLockException $e) {
            $this->messageBus->dispatch(new Message(
                $e->getMessage(),
                $e->getCode(),
                null,
                null,
                $e
            ));
        } catch (UniqueConstraintViolationException $e) {
            $this->messageBus->dispatch(new Message(
                $e->getMessage(),
                $e->getCode(),
                null,
                null,
                $e
            ));
        }
    }
1118382
public function save()
    {
        $data = $this->getData();
        if ($this->_collection->save($data, ["j" => true])['err'] === null) {
            $this->_id = $data['_id'];
            $this->_cache->store(static::getCollection()."_{$this->_id}", $data);
            return true;
        }
        // @codeCoverageIgnoreStart
        return false;
        // @codeCoverageIgnoreEnd
    }
102241
public function save()
    {
        $this->hook('beforeSave', array($this->id));

        $is_update = $this->loaded();
        if ($is_update) {
            $source = array();
            foreach ($this->dirty as $name => $junk) {
                $source[$name] = $this->get($name);
            }

            // No save needed, nothing was changed
            if (empty($source)) {
                return $this;
            }

            $this->hook('beforeUpdate', array(&$source));
        } else {

            // Collect all data of a new record
            $source = $this->get();

            $this->hook('beforeInsert', array(&$source));
        }

        if ($this->controller) {
            $this->id = $this->controller->save($this, $this->id, $source);
        }

        if ($is_update) {
            $this->hook('afterUpdate');
        } else {
            $this->hook('afterInsert');
        }

        if ($this->loaded()) {
            $this->dirty = array();
            $this->hook('afterSave', array($this->id));
        }

        return $this;
    }
691334
public function save()
    {
        $lifetime = $this->_params['lifetime'];

        foreach ($this->_update as $mbox => $val) {
            $s = &$this->_slicemap[$mbox];

            try {
                if (!empty($val['add'])) {
                    if ($s['c'] <= $this->_params['slicesize']) {
                        $val['slice'][] = $s['i'];
                        $this->_loadSlice($mbox, $s['i']);
                    }
                    $val['slicemap'] = true;

                    foreach (array_keys(array_flip($val['add'])) as $uid) {
                        if ($s['c']++ > $this->_params['slicesize']) {
                            $s['c'] = 0;
                            $val['slice'][] = ++$s['i'];
                            $this->_loadSlice($mbox, $s['i']);
                        }
                        $s['s'][$uid] = $s['i'];
                    }
                }

                if (!empty($val['slice'])) {
                    $d = &$this->_data[$mbox];
                    $val['slicemap'] = true;

                    foreach (array_keys(array_flip($val['slice'])) as $slice) {
                        $data = array();
                        foreach (array_keys($s['s'], $slice) as $uid) {
                            $data[$uid] = is_array($d[$uid])
                                ? serialize($d[$uid])
                                : $d[$uid];
                        }
                        $this->_cache->set($this->_getCid($mbox, $slice), serialize($data), $lifetime);
                    }
                }

                if (!empty($val['slicemap'])) {
                    $this->_cache->set($this->_getCid($mbox, 'slicemap'), serialize($s), $lifetime);
                }
            } catch (Horde_Exception $e) {
            }
        }

        $this->_update = array();
    }
350228
function save() {

		if ($this->cacheConf['type'] == 'noop') {
			// do nothing
		}
		else { // non-noop

			$stateCopy = $this->state;
			$stateCopy['loaded'] = [];

			if ($this->cacheConf['type'] == 'file') {
				$username = \get_current_user();
				$cacheDir = realpath($this->syspath.'/'.\trim($this->cacheConf['path'], '\\/'));
				$cachePath = $cacheDir.'/freia.'.(\php_sapi_name() === 'cli' ? 'cli' : 'server').'.'.$username.'.symbols.json';
				if ($this->file_exists($cacheDir)) {
					try {
						$this->file_put_contents($cachePath, \json_encode($stateCopy, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
						if ( ! $this->chmod($cachePath, $this->filePermission())) {
							$this->error_log("Unable to set permissions on cache file: $cachePath");
						}
					}
					catch (\Exception $e) {
						$this->error_log('Failed to save state to cache file ['.$cachePath.'] Error: '.$e->getMessage());
					}
				}
				else {
					$this->error_log('Missing cache directory: '.$this->cacheConf['path']);
				}
			}
			else if ($this->cacheConf['type'] == 'memcached') {
				$mc = $this->memcachedInstance();
				$success = $mc->set('freia-symbols', $stateCopy, time() + 604800);
				if ( ! $success) {
					$this->error_log("Memcached failed to store key freia-symbols, code: ".$mc->getResultCode());
				}
			}
		}
	}