Remove a contained record.

@throws InvalidArgumentException Record does not contain the record

@param  Record $record Record to remove
@return void
516911
protected function removeRecord (Record $record) 
    {
        $index = array_search($record, $this->_records, true);
        if ($index === false) {
            throw new InvalidArgumentException("{$this} does not contain {$record}");
        }
        unset($this->_records[$index]);
    }
1124776
protected function unsetImportedRelations(array & $record)
    {
        foreach ($record as $key => $value) {
            if (strpos($key, 'role_by_') !== false ||
                strpos($key, 'service_by_') !== false ||
                strpos($key, 'role_service_access_by_') !== false ||
                strpos($key, 'user_to_app_to_role_by_') !== false
            ) {
                if (empty($value) || is_array($value)) {
                    unset($record[$key]);
                }
            }
        }
    }
416045
protected function write(array $record): void
    {
        if ($record['level'] < Logger::NOTICE) {
            $this->handleDebugRecord($record);
        } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) {
            $this->handleExceptionRecord($record);
        } else {
            $this->handleErrorRecord($record);
        }
    }
568542
protected function open( Record $record = null )
    {
        if ($this->isOpen) {
            return;
        }

        $this->recordCount = 0;
        $this->isOpen      = true;

        $this->writer->open();
        $this->writeHeader( $record );
    }
601419
public function removeLocation(Location $location): void
    {
        if (!$this->locations->contains($location)) {
            throw new \InvalidArgumentException(
                    'The location to remove does not exist');
        }
        $location->setWarehouse(null);
        $this->locations->removeElement($location);
    }
98032
public function handle( Record $record )
    {
        if (is_null( $this->aggregateRecord )) {
            $this->setAggregateRecord( $record ); // first record

            return null;
        }

        if ($this->aggregateRecord->pushRecord( $record )) {
            return null;
        }

        return $this->setAggregateRecord( $record );
    }
1046398
public function remove($entity)
    {
        if (!is_object($entity)) {
            throw new InvalidArgumentException("Only objects can be registered in Unit of Work.");
        }

        if (!$this->isRegistered($entity)) {
            if (!$this->identifier->isPersisted($entity)) {
                throw new RuntimeException("Unit of Work can't remove not persisted entities.");
            }
        }

        $this->registry->remove($entity);
    }
503492
protected function checkIfOriginRecord($record)
    {
        if ($record instanceof RecordOriginInterface
            && !$record->isRecordOriginModifiable()
        ) {
            $values = $this->notModifiableOriginRecords;
            $originValue = strtolower(trim($record->getRecordOrigin()));

            if (in_array($originValue, $values)) {
                $msg = sprintf("Must not be one of the following keywords: %s", implode(', ', $values));

                throw new RecordOriginModifiedException($msg);
            }
        }
    }
653157
def _delete_record(self, identifier=None, rtype=None, name=None, content=None):
        """"""
        to_delete_ids = list()
        if identifier:
            to_delete_ids.append(identifier)
        else:
            for record in self._list_records(rtype=rtype, name=name, content=content):
                to_delete_ids.append(record["id"])

        for to_delete_id in to_delete_ids:
            self._request_delete_dns_record_by_id(to_delete_id)
        return True
976274
public function removePhone(PhoneInterface $phone)
    {
        if (!$this->hasPhone($phone)) {
            throw new \InvalidArgumentException('Trying to remove a phone that does not belong to this contact');
        }

        $this->phones->removeElement($phone);

        if ($phone === $this->defaultPhone) {
            if ($this->phones->count() > 0) {
                $this->defaultPhone = $this->phones->first();

                return;
            }

            $this->defaultPhone = null;
        }
    }
337239
protected function write(array $record): void
    {
        $this->hub->withScope(
            function (Scope $scope) use ($record) {
                if (!empty($record['context']['extra'])) {
                    foreach ($record['context']['extra'] as $key => $tag) {
                        $scope->setExtra($key, $tag);
                    }
                    unset($record['context']['extra']);
                }

                if (!empty($record['context']['tags'])) {
                    foreach ($record['context']['tags'] as $key => $tag) {
                        $scope->setTag($key, $tag);
                    }
                    unset($record['context']['tags']);
                }

                if (!empty($record['extra'])) {
                    foreach ($record['extra'] as $key => $extra) {
                        $scope->setExtra($key, $extra);
                    }
                }

                if (!empty($record['context']['fingerprint'])) {
                    $scope->setFingerprint($record['context']['fingerprint']);
                    unset($record['context']['fingerprint']);
                }

                if (!empty($record['context']['user'])) {
                    $scope->setUser($record['context']['user']);
                    unset($record['context']['user']);
                }

                $scope->addEventProcessor(
                    function (Event $event) use ($record) {
                        if (!empty($record['context']['logger'])) {
                            $event->setLogger($record['context']['logger']);
                            unset($record['context']['logger']);
                        } else {
                            $event->setLogger($record['channel']);
                        }

                        if (!empty($this->environment) && !$event->getEnvironment()) {
                            $event->setEnvironment($this->environment);
                        }

                        if (!empty($this->release) && !$event->getRelease()) {
                            $event->setRelease($this->release);
                        }

                        if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) {
                            $event->setMessage($record['formatted']);
                        }

                        return $event;
                    }
                );

                if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) {
                    $this->hub->captureException($record['context']['exception']);
                } else {
                    $this->hub->captureMessage($record['formatted'], $this->getLogLevel($record['level']));
                }
            }
        );
    }
339988
public function remove($name): void
    {
        if ($this->contains($name) == false) {
            return;
        }

        unset($this->record[$name]);
    }
1003896
protected function write(array $record)
    {
        if ($record['level'] < Logger::NOTICE) {
            $this->handleDebugRecord($record);
        } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof Exception) {
            $this->handleExceptionRecord($record);
        } else {
            $this->handleErrorRecord($record);
        }
    }
923207
public void updateRecord(final ORecordInternal<?> record) {
    if (isEnabled() && record.getIdentity().getClusterId() != excludedCluster && record.getIdentity().isValid()) {
      underlying.lock(record.getIdentity());
      try {
        if (underlying.get(record.getIdentity()) != record)
          underlying.put(record);
      } finally {
        underlying.unlock(record.getIdentity());
      }
    }

    secondary.updateRecord(record);
  }
1213295
private function excludeFields(array $record): array
    {
        foreach ($this->excludeFields as $field) {
            $keys = explode('.', $field);
            $node = &$record;
            $lastKey = end($keys);
            foreach ($keys as $key) {
                if (!isset($node[$key])) {
                    break;
                }
                if ($lastKey === $key) {
                    unset($node[$key]);
                    break;
                }
                $node = &$node[$key];
            }
        }

        return $record;
    }
183570
public function handle( Record $record )
    {
        $this->open( $record );

        if ($this->recordFormatter->formatRecord( $this->writer, $record )) {
            $this->incrementRecordCount();
        }

        return $record;
    }
498821
private function addBulkDeleteRecord($record)
    {
        if ($this->bulkDeleteLimit === count($this->bulkDeleteRecords)) {
            $this->flushDeletes();
        }

        $this->bulkDeleteRecords[] = $record;
    }