Delete a document from the repository using its ID.

@param mixed $id The ID of the document (or the document itself) to delete

@return boolean True if deleted, false if not.
8343
public function delete($id)
    {
        if ($id instanceof DocumentInterface) {
            $id = $id->getId();
        }

        $path = $this->getPathForDocument($id);

        return unlink($path);
    }
118927
public function deleteAction($id)
    {
        $documentManager = $this->getDocumentManager();
        $document = $documentManager->find($id);
        $documentManager->remove($document);
        $documentManager->flush();

        return $this->handleView($this->view(null));
    }
314425
public function delete($id)
    {
        $entity = $this->get($id);

        $this->manager->remove($entity);
        $this->manager->flush();
    }
1306050
public function deletePost( $id ) {
        $response = $this->service->api( 'statuses/destroy/' . $id . '.json', 'POST' );

        return isset( $response['id'] ) && $response['id'] == $id;
    }
1013343
public function remove($id)
    {
        $file = $this->_file($id);
        $boolRemove   = $this->_remove($file);
        $boolMetadata = $this->_delMetadatas($id);
        return $boolMetadata && $boolRemove;
    }
100445
public function deleteAction($id)
    {
        $manager = $this->getTaskManager();
        $manager->remove($id);

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

        return $this->handleView($this->view());
    }
833911
public function deleteUser($id)
    {
        $user = $this->getRepository()->find($id);

        if (!$user) {
            $this->app['logger.flash']->warning(Trans::__('general.phrase.user-not-exist'));

            return false;
        }

        $userId = $user->getId();
        if ($result = $this->getRepository()->delete($user)) {
            /** @var Repository\AuthtokenRepository $authtokenRepository */
            $authtokenRepository = $this->app['storage']->getRepository(Entity\Authtoken::class);
            $authtokenRepository->deleteTokens($userId);
        }

        return $result;
    }
732870
public function delete($id)
    {
        $supported = $this->isSupported('delete');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/'.$id.'/delete', array(), 'DELETE') : $supported;
    }
854915
public function remove($id)
    {
        try {
            return $this->resource->delete([
                'index' => $this->schema->getName(),
                'type' => static::INDEX_TYPE,
                'id' => $id
            ]);
        } catch (NoNodesAvailableException $e) {
            return false;
        }
    }
1224810
public function deleteById($id)
    {
        try {
            $obj = $this->getById($id);
            $this->delete($obj);
            return true;
        } catch (\Exception $e) {
            throw $e;
        }
    }
661901
public function delete($id)
	{
		try {
			$this->getIndex()->deleteObject($id);
		} catch (\Exception $e) {
			return false;
		}
		
		return true;
	}
568798
public function delete($id)
    {
        $this->_write(sprintf('delete %d', $id));
        $status = $this->_read();

        switch ($status) {
            case 'DELETED':
                return true;
            case 'NOT_FOUND':
                return false;
            default:
                throw new ServerException('Delete error: '.$status);
        }
    }
530860
public function delete($id)
    {
        $this->applyScope();

        $model = $this->find($id);
        $originalModel = clone $model;

        $this->resetModel();

        $deleted = $model->delete();

        event(new RepositoryEntityDeleted($this, $originalModel));

        return $deleted;
    }
147401
public function delete(string $id)
    {
        $this->request->allowMethod('delete');

        $entity = $this->SavedSearches->find()
            ->enableHydration(true)
            ->where(['id' => $id])
            ->first();

        $success = false;
        if (null !== $entity) {
            Assert::isInstanceOf($entity, EntityInterface::class);
            $success = $this->SavedSearches->delete($entity);
        }

        $this->set('success', $success);
        $success ?
            $this->set('data', []) :
            $this->set('error', 'The saved search could not be deleted. Please, try again.');
        $this->set('_serialize', ['success', 'data', 'error']);
    }
1310290
public function delete($id)
    {
        $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';

        if (method_exists($this, 'beforeDelete')) {
            $this->beforeDelete();
        }

        if ($this->qb->table($this->table)->limit(1)->delete([$primaryKey => $id])) {
            if (method_exists($this, 'afterDelete')) {
                return $this->afterDelete();
            }

            return true;
        }

        return false;
    }
487981
public function destroy($id)
    {
        $this->_table->delete(new Entity(
            [$this->_table->getPrimaryKey() => $id],
            ['markNew' => false]
        ));

        return true;
    }
871540
public function destroy($id) {
        $key = $this->getKey($id);
        return $this->mem->remove($key);
    }