Remove a Zip object from manager by Zip id

@param string $id

@return bool
@throws ZipException
972512
public function removeZipById(string $id): bool {

        if ( isset($this->zip_archives[$id]) === false ) {
            throw new ZipException("Archive: $id not found");
        }
        unset($this->zip_archives[$id]);
        return true;

    }
119275
static function removeByID( $id )
    {
        $db = eZDB::instance();

        $idString = $db->escapeString( $id );
        $db->begin();

        $db->query( "DELETE FROM ezpolicy_limitation_value
                     WHERE ezpolicy_limitation_value.limitation_id = '$idString'" );

        $db->query( "DELETE FROM ezpolicy_limitation
                     WHERE ezpolicy_limitation.id = '$idString' " );
        $db->commit();
    }
1039674
public function destroy($id)
    {
        // get permission by id
        $permission = Permission::find($id);

        if (!$permission) {
            return response()->json(null, 404);
        }

        // delete permission
        $deletePermission = $permission->delete();

        if (!$deletePermission) {
            return response()->json(null, 500); // @codeCoverageIgnore
        }

        return response()->json(null, 204);
    }
907289
public static function remove($id)
    {
        if (isset(self::$list[$id])) {
            self::$list[$id]->free();
        }
    }
834461
public static function removeByID( $id )
    {
        $db = eZDB::instance();
        $db->begin();
        $db->query( "DELETE FROM ezcobj_state_link WHERE contentobject_state_id=$id" );
        eZPersistentObject::removeObject( eZContentObjectStateLanguage::definition(), array( 'contentobject_state_id' => $id ) );
        eZPersistentObject::removeObject( eZContentObjectState::definition(), array( 'id' => $id ) );
        $db->commit();
    }
100445
public function deleteAction($id)
    {
        $manager = $this->getTaskManager();
        $manager->remove($id);

        $this->getEntityManager()->flush();

        return $this->handleView($this->view());
    }
275245
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        Configs::authManager()->remove($model->item);
        Helper::invalidate();

        return $this->redirect(['index']);
    }
808366
public function destroy($id)
    {
        $extension = $this->repository->findOrFail($id);
        if ($extension->protected) {
            return $this->notifyError(trans('cms::extension.protected'));
        }

        if ($this->repository->uninstall($id)) {
            flash()->success(trans('cms::extension.deleted', compact('id')));
        } else {
            flash()->error(trans('cms::extension.error', compact('id')));
        }

        return back();
    }
272087
public function destroy($id)
    {
        $modelName = $this->modelFullName;
        $int = $modelName::destroy($id);
        if(!$int) throw new NotFoundException('There is no Resource with id = ' . $id . ' !');
        return $int;
    }
1026359
public function delete($id)
    {
        try
        {
            $perm = $this->model->findOrFail($id);
            $oldData = $perm;
            $perm->delete();
            $this->event->fire('permissions.delete', array($oldData));

            return true;
        }
        catch ( ModelNotFoundException $e)
        {
            return false;
        }
    }
318389
public function destroy($id)
    {
        // Note: Do NOT delete session data in $_SESSION variable or
        // session cookie here as this method is also called via
        // session_regenerate_id(true)

        // Delete session file on disk
        $file = $this->getPathForSessionId($id);
        if (file_exists($file)) {
            unlink($file);
        }

        return true;
    }
1260474
public function delete($id)
	{
		try {
			$this->getClient()->get(array(
				'index' => $this->name,
				'type'  => static::$default_type,
				'id'    => $id,
			));
		} catch (\Elasticsearch\Common\Exceptions\Missing404Exception $e) {
			return false;
		}
		
		$doc = $this->getClient()->delete(array(
			'index' => $this->name,
			'type'  => static::$default_type,
			'id'    => $id,
		));
		
		return true;
	}
781617
public static function destroy($id)
    {
        $table = self::getTableNameFromClass();

        self::getOne($id);

        $query = "DELETE FROM $table WHERE id = ".$id;

        try {
            Connection::db()->query($query);
            return true;
        } catch (Exception $e) {
            return false;
        }
    }
1058505
public function deleteAction($id)
    {
        /** @var ContentManager $manager */
        $manager = $this->get('opifer.content.content_manager');
        $content = $manager->getRepository()->find($id);

        //generate new slug so deleted slug can be used again
        $hashedSlug = $content->getSlug().'-'.sha1(date('Y-m-d H:i:s'));

        $content->setSlug($hashedSlug);
        $manager->save($content);

        $manager->remove($content);

        return new JsonResponse(['success' => true]);
    }
632588
public function delete($id) {
        $params = $this->parseUrl($id);

        try {
            $this->getClient()->deleteObject(array(
                'Bucket' => $params['bucket'],
                'Key' => $params['key']
            ));
        } catch (S3Exception $e) {
            return false;
        }

        return true;
    }
928301
public function delete($id)
    {
        return $this->model->where($this->model->getKeyName(), $id)->delete();
    }
49752
public static function destroy($id) 
    {
        try {
            $file = self::find($id);
            
            if($file->descendants()->exists()) {
                foreach($file->descendants()->where('type', '!=', 'folder')->get() as $descendant) {
                    
                    event(new FileWasDeleted([ // fire 'file deleted' event for each descendant
                        'file' => $descendant
                    ]));
                }
            }
            
            $file->delete($id);

            if($file->type != 'folder') {
                event(new FileWasDeleted([ // fire 'file deleted' event for file
                    'file' => $file
                ]));
            }
        }
        
        catch (Exception $e) {
            throw $e;
        }
    }