Delete all the saved models.

@throws \League\FactoryMuffin\Exceptions\DeletingFailedException

@return void
322859
public function deleteSaved()
    {
        $exceptions = [];

        while ($model = array_pop($this->saved)) {
            try {
                if (!$this->delete($model)) {
                    throw new DeleteFailedException(get_class($model));
                }
            } catch (Exception $e) {
                $exceptions[] = $e;
            }
        }

        // If we ran into any problems, throw the exception now
        if ($exceptions) {
            throw new DeletingFailedException($exceptions);
        }
    }
1114957
public function delete() : void
    {
        $files = $this->getFiles();
        foreach($files as $file) {
            $file->delete();
        }
        rmdir($this->path);
    }
74872
public function cleanup() {
		foreach ( $this->_factories as $factory ) {
			if ( $factory instanceof \WPCC\Component\Factory ) {
				$factory->deleteAll();
			}
		}
	}
1159521
public function delete()
	{
		if ($this->exists)
		{
			if ($this->fireModelEvent('deleting') === false) return false;

			// Here, we'll touch the owning models, verifying these timestamps get updated
			// for the models. This will allow any caching to get broken on the parents
			// by the timestamp. Then we will go ahead and delete the model instance.
			$this->touchOwners();

			$this->performDeleteOnModel();

			$this->exists = false;

			// Once the model has been deleted, we will fire off the deleted event so that
			// the developers may hook into post-delete operations. We will then return
			// a boolean true as the delete is presumably successful on the database.
			$this->fireModelEvent('deleted', false);

			return true;
		}
	}
90490
public function clear()
    {
        $this->entityPersisters               =
        $this->collectionPersisters           =
        $this->eagerLoadingEntities           =
        $this->identityMap                    =
        $this->entityIdentifiers              =
        $this->originalEntityData             =
        $this->entityChangeSets               =
        $this->entityStates                   =
        $this->scheduledForSynchronization    =
        $this->entityInsertions               =
        $this->entityUpdates                  =
        $this->entityDeletions                =
        $this->collectionDeletions            =
        $this->collectionUpdates              =
        $this->extraUpdates                   =
        $this->readOnlyObjects                =
        $this->visitedCollections             =
        $this->nonCascadedNewDetectedEntities =
        $this->orphanRemovals                 = [];
    }
287510
protected function flushDeletes()
    {
        if ( ! $this->deleteTarget) {
            return;
        }

        foreach ($this->queuedForDelete as $variant) {
            $this->handler->deleteVariant($this->deleteTarget, $variant);
        }

        $this->queuedForDelete = [];
    }
1327014
public function clear()
    {
        $this->id = null;
        $this->created_at = null;
        $this->updated_at = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
1332089
public function clear()
    {
        $this->id = null;
        $this->first_name = null;
        $this->last_name = null;
        $this->created_at = null;
        $this->updated_at = null;
        $this->version = null;
        $this->version_created_at = null;
        $this->version_created_by = null;
        $this->person_team_link_ids = null;
        $this->person_team_link_ids_unserialized = null;
        $this->person_team_link_versions = null;
        $this->person_team_link_versions_unserialized = null;
        $this->person_image_ids = null;
        $this->person_image_ids_unserialized = null;
        $this->person_image_versions = null;
        $this->person_image_versions_unserialized = null;
        $this->person_function_link_ids = null;
        $this->person_function_link_ids_unserialized = null;
        $this->person_function_link_versions = null;
        $this->person_function_link_versions_unserialized = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->applyDefaultValues();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
525574
public function cleanup()
    {
        Cache::clear(false, 'default');
        Cache::clear(false, '_cake_model_');
        Cache::clear(false, '_cake_core_');
        $this->dispatchShell('orm_cache clear');
        $this->dispatchShell('orm_cache build');
    }
543009
public function delete() {
        global $DB;

        \core_analytics\manager::check_can_manage_models();

        $this->clear();

        // Method self::clear is already clearing the current model version.
        $predictor = $this->get_predictions_processor(false);
        if ($predictor->is_ready() !== true) {
            $predictorname = \core_analytics\manager::get_predictions_processor_name($predictor);
            debugging('Prediction processor ' . $predictorname . ' is not ready to be used. Model ' .
                $this->model->id . ' could not be deleted.');
        } else {
            $predictor->delete_output_dir($this->get_output_dir(array(), true));
        }

        $DB->delete_records('analytics_models', array('id' => $this->model->id));
        $DB->delete_records('analytics_models_log', array('modelid' => $this->model->id));
    }
551949
void deleteAll() {
        transactionTemplate.execute(new TransactionCallbackWithoutResult() {
            @Override
            protected void doInTransactionWithoutResult(TransactionStatus status) {
                sessionFactory.getCurrentSession().createQuery("DELETE FROM VersionInfo").executeUpdate();
            }
        });
    }
1051854
static public function destroyAll()
    {
        $models = call_user_func_array(get_called_class() . '::where', func_get_args())->take();
        foreach ($models as $m) {
            $m->destroy();
        }
        return $models;
    }
946839
public function clear()
    {
        if (null !== $this->aSkill) {
            $this->aSkill->removeStructureNode($this);
        }
        $this->id = null;
        $this->type = null;
        $this->skill_id = null;
        $this->title = null;
        $this->descendant_class = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
1322815
public function clear()
    {
        if (null !== $this->aSkill) {
            $this->aSkill->removePicture($this);
        }
        $this->id = null;
        $this->title = null;
        $this->description = null;
        $this->url = null;
        $this->thumb_url = null;
        $this->skill_id = null;
        $this->photographer = null;
        $this->photographer_id = null;
        $this->athlete = null;
        $this->athlete_id = null;
        $this->uploader_id = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
556943
public function removeAll()
    {
        $this->removed_objects = array_values($this->objects);
        $this->objects = array();
        $this->objects_by_index = array();
        $this->current_index = 0;
    }
1283065
def delete(self, **kwargs):
        """"""
        self.inflate()
        for model in self._models:
            model.delete(**kwargs)
        return
295574
public function cleanup(Model $model) {
        if ($model->id) {
            $this->resetCache($model, $model->id);
        }

        foreach ($this->_cached as $key => $value) {
            $this->deleteCache($model, $key);
        }
    }