Saves the receiver into the given data object.

@param DataObjectInterface|DataObject $record

@return void
166103
public function saveInto(DataObjectInterface $record)
    {
        $name = $this->getName();
        
        if ($record->hasMethod("set{$name}")) {
            
            $record->$name = DBField::create_field('Dimensions', $this->getDimensionValues());
            
        } else {
            
            foreach ($this->getDimensionValues() as $dim => $value) {
                $record->{"{$name}$dim"} = $value;
            }
            
        }
    }
507556
public function saveInto(DataObjectInterface $object) {
		if(!$this->canCrop() || !$this->hasSourceFile()) {
			return;
		}
		$object->setField($this->getName() . 'ID', $this->generateCropped()->ID);
		$object->write();
	}
677921
public function processRecord(Record $record)
    {
        $extraData = $record->getExtra();
        $extraData['memoryUsage'] = memory_get_usage(true);
        $record->setExtra($extraData);
    }
1269671
protected function emit(\Plop\RecordInterface $record)
    {
        $msg = $this->format($record);
        fprintf($this->stream, "%s\n", $msg);
        $this->flush();
    }
230067
protected function write(array $record)
    {
        if (!self::$sendHeaders) {
            return;
        }

        // WildFire-specific headers must be sent prior to any messages
        if (!self::$initialized) {
            self::$initialized = true;

            self::$sendHeaders = $this->headersAccepted();
            if (!self::$sendHeaders) {
                return;
            }

            foreach ($this->getInitHeaders() as $header => $content) {
                $this->sendHeader($header, $content);
            }
        }

        $header = $this->createRecordHeader($record);
        if (trim(current($header)) !== '') {
            $this->sendHeader(key($header), current($header));
        }
    }
1279459
public function store($record)
    {
        $params['index'] = $this->getName();
        $params['type'] = $record['type'];
        $params['id'] = $record['id'];
        $params['body'] = $record['data'];

        self::getClient()->index($params);
    }
1174074
def save_records(self, records):
        '''
        
        '''
        for record in records:
            if not isinstance(record, Record):
                record = Record(*record)
            self.save_record(*record)
51432
public function save($record, $objectType, $matchField = null)
    {
        if ($matchField) {
            $this->addBulkUpsertRecord($record, $objectType, $matchField);
        } elseif (isset($record->Id) && null !== $record->Id) {
            $this->addBulkUpdateRecord($record, $objectType);
        } else {
            $this->addBulkCreateRecord($record, $objectType);
        }

        return $this;
    }
191675
public function processRecord(Record $record)
    {

        $backtrace = debug_backtrace();
        $backtrace = $backtrace[5];

        $extraData = $record->getExtra();

        $extraData['file'] = $backtrace['file'];
        $extraData['line'] = $backtrace['line'];

        $record->setExtra($extraData);
    }
1010489
public function insertOne(array $record): int
    {
        $method = 'addRecord';
        if (70400 > PHP_VERSION_ID && '' === $this->escape) {
            $method = 'addRFC4180CompliantRecord';
        }

        $record = array_reduce($this->formatters, [$this, 'formatRecord'], $record);
        $this->validateRecord($record);
        $bytes = $this->$method($record);
        if (false !== $bytes && 0 !== $bytes) {
            return $bytes + $this->consolidate();
        }

        throw CannotInsertRecord::triggerOnInsertion($record);
    }
249313
public function handleSave(GridField $grid, DataObjectInterface $record)
    {
        if (!$this->immediateUpdate) {
            $value = $grid->Value();
            $sortedIDs = $this->getSortedIDs($value);
            if ($sortedIDs) {
                $this->executeReorder($grid, $sortedIDs);
            }
        }
    }
208633
protected function write(array $record) {
        $header = $this->getSyslogHeader($this->logLevels[$record['level']], $record['datetime']);
        $this->socket->write($record['formatted'], $header);
    }
656087
protected function processRecord(Record $record)
    {

        foreach ($this->processors as $processor) {
            if ($this->isInstanceOf($processor, ProcessorInterface::class)) {
                $processor->processRecord($record);
            } else {
                call_user_func($processor, $record);
            }
        }
    }
422111
public function pushRecord(Record $record)
    {
        $this->records[] = $record;

        if (!$record->getType()->isStdin() || $record->getContent()) {
            return;
        }

        return $this->buildRequest();
    }
1125149
public function saveInto(DataObjectInterface $record)
    {
        if (!$this->actionToExecuteOnSaveInto) {
            return;
        }

        if ($this->actionToExecuteOnSaveInto instanceof FormAction) {
            $this->actionToExecuteOnSaveInto = $this->actionToExecuteOnSaveInto->actionName();
        }

        $funcName = $this->actionToExecuteOnSaveInto;

        if (!$funcName && $defaultAction = $this->inlineForm->defaultAction()) {
            $funcName = $defaultAction->actionName();
        }

        if ($funcName) {
            $this->inlineForm->setButtonClicked($funcName);
        } else {
            if($this->inlineForm->Record) {
                $record = $this->inlineForm->Record;
            }

            $this->unprependName($this->inlineForm->Fields());
            $this->inlineForm->loadDataFrom($this->value);
            $this->inlineForm->saveInto($record);

            return;
        }

        if (
            // Ensure that the action is actually a button or method on the form,
            // and not just a method on the controller.
            (
                $this->form
                && $this->form->Controller
                && $this->form->Controller->hasMethod($funcName)
                && !$this->form->Controller->checkAccessAction($funcName)
                // If a button exists, allow it on the controller
                && !$this->form->dataFieldByName('action_' . $funcName)
            ) &&
            (
                $this->inlineForm
                && $this->inlineForm->Controller
                && $this->inlineForm->Controller->hasMethod($funcName)
                && !$this->inlineForm->Controller->checkAccessAction($funcName)
                // If a button exists, allow it on the controller
                && !$this->inlineForm->dataFieldByName('action_' . $funcName)
            ) &&
            ($this->form->hasMethod($funcName) && !$this->form->checkAccessAction($funcName)) &&
            ($this->inlineForm->hasMethod($funcName) && !$this->inlineForm->checkAccessAction($funcName))
            // No checks for button existence or $allowed_actions is performed -
            // all form methods are callable (e.g. the legacy "callfieldmethod()")
        ) {
            return;
        }

        $this->unprependName($this->inlineForm->Fields());
        $this->inlineForm->loadDataFrom($this->value);
        $request = \Controller::curr()->Request;

        if ($this->inlineForm->Controller->hasMethod($funcName)) {
            $this->inlineForm->Controller->$funcName($this->inlineForm->Data, $this->inlineForm, $request);
            // Otherwise, try a handler method on the form object.
        } elseif ($this->inlineForm->hasMethod($funcName)) {
            $this->inlineForm->$funcName($this->inlineForm->Data, $this->inlineForm, $request);
        } elseif ($this->form && $this->form->Controller->hasMethod($funcName)) {
            $this->form->Controller->$funcName($this->inlineForm->Data, $this->inlineForm, $request);
        } elseif ($this->form && $this->inlineForm->hasMethod($funcName)) {
            $this->form->$funcName($this->inlineForm->Data, $this->inlineForm, $request);
        } elseif ($field = $this->inlineForm->checkFieldsForAction($this->inlineForm->Fields(), $funcName)) {
            $field->$funcName($this->inlineForm->Data, $this->inlineForm, $request);
        }
    }
1122206
protected function write(array $record)
    {
        if (!$this->initialized) {
            $this->initialize();
        }

        /**
         * reset $fields with default values
         */
        $this->fields = $this->defaultfields;

        /*
         * merge $record['context'] and $record['extra'] as additional info of Processors
         * getting added to $record['extra']
         * @see https://github.com/Seldaek/monolog/blob/master/doc/02-handlers-formatters-processors.md
         */
        if (isset($record['extra'])) {
            $record['context'] = array_merge($record['context'], $record['extra']);
        }

        //'context' contains the array
        $contentArray = array_merge(array(
                                        'channel' => $record['channel'],
                                        'level' => $record['level'],
                                        'message' => $record['message'],
                                        'time' => $record['datetime']->format('U')
                                    ), $record['context']);

        // unset array keys that are passed put not defined to be stored, to prevent sql errors
        foreach($contentArray as $key => $context) {
            if (! in_array($key, $this->fields)) {
                unset($contentArray[$key]);
                unset($this->fields[array_search($key, $this->fields)]);
                continue;
            }

            if ($context === null) {
                unset($contentArray[$key]);
                unset($this->fields[array_search($key, $this->fields)]);
            }
        }

        $this->prepareStatement();

        //Fill content array with "null" values if not provided
        $contentArray = $contentArray + array_combine(
            $this->additionalFields,
            array_fill(0, count($this->additionalFields), null)
        );

        $this->statement->execute($contentArray);
    }
844431
public function saveInto(DataObjectInterface $record)
    {
        $name = $this->getName();
        
        if ($record->hasMethod("set{$name}")) {
            
            $record->$name = DBField::create_field('Viewport', $this->getViewportValues());
            
        } else {
            
            foreach ($this->getViewportValues() as $viewport => $value) {
                $record->{"{$name}$viewport"} = $value;
            }
            
        }
    }