Save dirty data into the data source

@return bool
323286
public function save()
    {
        if ($this->dirt) {
            return $this->driver->save($this->settings, $this->dirt);
        }

        return false;
    }
574260
public function save()
    {
        if ($this->getPk() !== null && !empty($this->_state)) {
            return $this->_update();
        }
        return $this->_insert();
    }
1015747
public function Save () {
		$rawContent = $this->Dump();
		if ($rawContent === FALSE) 
			throw new \Exception('Configuration data was not possible to dump.');
		$app = self::$app ?: self::$app = & \MvcCore\Application::GetInstance();
		$toolClass = $app->GetToolClass();
		try {
			$toolClass::SingleProcessWrite(
				$this->fullPath, 
				$rawContent, 
				'w',	// Open for writing only; place pointer at the beginning and truncate to zero length. If file doesn't exist, create it.
				10,		// Milliseconds to wait before next lock file existence is checked in `while()` cycle.
				5000,	// Maximum milliseconds time to wait before thrown an exception about not possible write.
				30000	// Maximum milliseconds time to consider lock file as operative or as old after some died process.
			);
		} catch (\Exception $ex) {
			throw $ex;
		}
		return TRUE;
	}
568330
public function save(){

        foreach ($this->cols as $table => $prkey){

            foreach($prkey as $prkey_){

                if(strlen($prkey_)<3){continue;}

            $this->writedb($table, $prkey_);
            }
        //more table records
        $this->rows[$table]['index'] = $this->indexData[$table];

            try{
            $this->writedb($table, 'index');
            }
            catch(Exception $aa){
              return false;
            }

        }
    return true;
    }
248660
public function save()
    {
        $result = true;

        if (!empty($this->changedData)) {
            foreach ($this->changedData as $scope => $rowData) {
                foreach ($rowData as $layoutName => $layoutData) {
                    if (empty($scope) || empty($layoutName)) {
                        continue;
                    }
                    $layoutPath = $this->getLayoutPath($scope, true);
                    $data = Json::encode($layoutData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);

                    $result &= $this->getFileManager()->putContents(array($layoutPath, $layoutName.'.json'), $data);
                }
            }
        }

        if ($result == true) {
            $this->clearChanges();
        }

        return (bool) $result;
    }
1303452
protected function save()
    {
        $filename = Path::create([$this->outputPath(), $this->outputFile()]);

        return (bool) \file_put_contents($filename->toString(), $this->stub);
    }
1331785
public function save()
    {
        $requestor = new ApiRequestor();
        $params = $this->serializeParameters();
        self::_validateCall( 'save', $params );
        unset( $params['id'] );

        if( count( $params ) > 0 )
        {
            $url = '/' . $this->getType() . '/' . $this->id;
            return $requestor->request('put', $url, $params);
        }

        return true;
    }
107063
public function cleanTrash()
	{
		$response = $this->send(new Request($this->uri->withPath($this->uri->getPath().'trash/resources'), 'DELETE'));

		if ($response->getStatusCode() == 204)
		{
			$response = json_decode($response->getBody(), true);

			if ( ! empty($response['operation']))
			{
				return $response['operation'];
			}

			return true;
		}

		return false;
	}
1275595
public function saveCacheListing()
    {

        if (md5(json_encode($this->cacheListing)) === $this->md5Sum) return false;

        return parent::set('cacheListing', $this->cacheListing);
    }
169462
public function save() : bool
    {
        if (!$this->isTableNameSet()) {
            return false;
        }
        $pkName = $this->primaryKey;
        if ((int) $this->$pkName > 0) {
            $this->updateEntry();
        } else {
            $this->createEntry();
        }
        return true;
    }
382115
public function save()
    {
        $path = $this->paths['customPath'];

        $result = true;
        if (!empty($this->changedData)) {
            foreach ($this->changedData as $key1 => $keyData) {
                foreach ($keyData as $key2 => $data) {
                    if (!empty($data)) {
                        $result &= $this->getFileManager()->mergeContents(array($path, $key1, $key2.'.json'), $data, true);
                    }
                }
            }
        }

        if (!empty($this->deletedData)) {
            foreach ($this->deletedData as $key1 => $keyData) {
                foreach ($keyData as $key2 => $unsetData) {
                    if (!empty($unsetData)) {
                        $rowResult = $this->getFileManager()->unsetContents(array($path, $key1, $key2.'.json'), $unsetData, true);
                        if ($rowResult == false) {
                            $GLOBALS['log']->warning('Metadata items ['.$key1.'.'.$key2.'] can be deleted for custom code only.');
                        }
                        $result &= $rowResult;
                    }
                }
            }
        }

        if ($result == false) {
            throw new Error("Error saving metadata. See log file for details.");
        }

        $this->clearChanges();

        return (bool) $result;
    }
897518
public function save()
    {
        // No images to process
        if (0 === count($this->frames)) {
            return false;
        }

        return (boolean)file_put_contents($this->outFilePath, $this->getAnimation(), LOCK_EX);
    }
494465
public function save()
    {
        $this->load();
        // Do the work in case we have only changed hash
        if ($this->isChanged()) {
            @chmod($this->path, 0777);
            return file_put_contents($this->path, $this->fileType->render($this->config));
        } else {
            return true;
        }
    }
1318630
public function save()
    {
        $result;
        if (! self::$id) {
            // new record so we insert
            $query = "INSERT INTO $this->tableName (".implode(", ", array_keys($this->props)).") VALUES(";

            for ($i = 0; $i < count($this->props); $i++) {
                $query .= "?";

                if ($i != count($this->props) - 1) {
                    $query .= ",";
                }
            }

            $query .= ");";

            $insert = Connection::db()->prepare($query);
            $result = $insert->execute(array_values($this->props));
        } else {
            // existing record, se we update
            $query = "UPDATE $this->tableName SET ";

            $count = 0;
            foreach ($this->props as $key => $value) {
                $query .= "$key = '$value'";

                if ($count != count($this->props) - 1) {
                    $query .= ",";
                }
                $count++;
            }

            $query .= " WHERE id = ".self::$id;
            $result = Connection::db()->query($query);
        }

        if (! $result) {
            return false;
        } else {
            return true;
        }
    }
1240479
public function save()
    {
        // Grab the directory and create it if needed
        $info = pathinfo($this->fname);
        $dir  = $info['dirname'];

        if (!is_dir($dir)) {
            // dir doesn't exist, make it
          mkdir($dir, 0777, true);
        }


        return file_put_contents($this->fname, json_encode($this->data));
    }
1017689
private function saveFile()
    {
        $dirMedia = $this->filesystem->getDirectoryWrite(ADirList::MEDIA);
        $dirTarget = $dirMedia->getAbsolutePath(self::MEDIA_SUBFOLDER);
        $fileId = self::FIELDSET . '[' . self::FIELD_CSV_FILE . ']';
//        $fileId = self::FIELD_CSV_FILE;
//        $fileId = self::FIELDSET;
        $uploader = $this->factUploader->create(['fileId' => $fileId]);
        $uploader->setAllowRenameFiles(true);
        $result = $uploader->save($dirTarget);
        if (isset($result['path']) && isset($result['file'])) {
            $fullpath = $result['path'] . $result['file'];
            $this->logger->info("Uploaded file is saved into '$fullpath'.");
        }
        return $result;
    }
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
    }