Delete Item by id. Method do nothing if item with that id is absent.

@param int|string $id PrimaryKey
@return int number of deleted items: 0 , 1 or null if object doesn't support it
@throws DataStoreException
553524
public function publicdelete($id)
    {
        if (method_exists($this->dataSource, "delete")) {
            return $this->dataSource->delete($id);
        } else {
            throw new DataStoreException("Refreshable don't haw method delete");
        }
    }
1277642
public function delete($id)
    {
        $this->sqlBuilder->addWhere($this->primaryKey, $id);
        return $this->deletes();
    }
65190
public int deleteByIdCascade(String id) throws SQLException {
		int count = 0;
		if (id != null) {
			TableIndex tableIndex = queryForId(id);
			if (tableIndex != null) {
				count = deleteCascade(tableIndex);
			}
		}
		return count;
	}
557238
public function deleteById($id) {
		$this->provider('cache')->cacheClear('db', $this->getDao()->getTableName());
	    $obj = $this->getConnection()->where($this->getDao()->getTableId(), $id);
        return $obj->delete($this->getDao()->getTableName());
	}
75016
public function remove($id)
    {
        $item = $this->getOrFail($id);
        unset($this->items[$id]);
        return $item;
    }
983662
public function delete($id)
    {
        /** @var \Colibri\Database\Model $item */
        $item = new $this->itemClass();
        $item->delete($id);

        header(
            'Location: ' .
            (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/' . $this->division . '/' . $this->module)
        );
    }
1224810
public function deleteById($id)
    {
        try {
            $obj = $this->getById($id);
            $this->delete($obj);
            return true;
        } catch (\Exception $e) {
            throw $e;
        }
    }
309706
public function delete($id)
    {
        if ($this->has($id)) {
            //remove instance
            unset($this->instances[$id]);

            //remove interface reference if exists
            foreach ($this->interfaces as $int => $classes) {
                $key = array_search($id, $classes);
                if ($key !== false) {
                    unset($classes[$key]);
                    $this->interfaces[$int] = $classes;
                }
            }

            //remove instance from singleton binding
            if ($this->hasDefinition($id)) {
                $definition = $this->getDefinition($id);
                if ($definition instanceof Singleton) {
                    $definition->deleteStoredInstance();
                }
            }
        }
        return $this;
    }
654604
public function delete($id)
    {
        $db = new DatabaseManager();
        $connection = $db->getDbh();

        $sql = 'DELETE from :table WHERE id=:id';
        $sql = str_replace(':table', $this->tableName, $sql);

        $statement = $connection->prepare($sql);
//        $statement->bindParam(':table',  $this->tableName);
        $statement->bindParam(':id', $id, \PDO::PARAM_INT);

        $queryWasSuccessful = $statement->execute();
        return $queryWasSuccessful;
    }
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;
    }
806564
public function delete($id)
    {
        if ($this->hasDeleteTrait($this->modelInstance)) {
            return $this->destroy($id);
        }

        return $this->modelInstance->destroy($id);
    }
295397
public function delete($id)
    {
        $model = $this->find($id);

        if (!$model) {
            throw new RepositoryException("O item não solicitado não existe.");
        }

        return $model->delete();
    }
194529
public function delete($id)
    {
        $idName = ucfirst($this->idProperty->getName());
        return $this->__call("deleteBy$idName", array($id));
    }
1177788
public function delete($id)
    {
        $item = $this->itemRepository->findById($id);

        if (!$item) {
            throw new ItemNotFoundException($id);
        }

        $this->em->remove($item);
        $this->em->flush();
    }
1302021
public
    function destory($id)
    {
        $row = Model::find($id);
        $row->delete();
        flash()->success('Your Item Deleted');
        return redirect()->to("/menus");
    }
584474
public function delete($id)
    {
        $model = $this->getById($id);

        $argv = compact('id', 'model');
        $argv = $this->prepareEventArguments($argv);

        $this->getEventManager()->trigger(self::EVENT_PRE_DELETE, $this, $argv);

        $result = $this->getMapper()->delete([
            $this->getMapper()->getPrimaryKey() => $id
        ]);

        if ($result) {
            $this->removeCacheItem($id);
            $argv = compact('id', 'model', 'result');
            $argv = $this->prepareEventArguments($argv);
            $this->getEventManager()->trigger(self::EVENT_POST_DELETE, $this, $argv);
        }

        return $result;
    }
908421
public function delete(string $id)
    {
        $this->request->allowMethod(['post', 'delete']);
        $model = $this->loadModel();
        $entity = $model->get($id);

        if ($model->delete($entity)) {
            $this->Flash->success((string)__('The record has been deleted.'));
        } else {
            $this->Flash->error((string)__('The record could not be deleted. Please, try again.'));
        }

        $url = $this->referer();

        if (false !== strpos($url, $id)) {
            $url = ['action' => 'index'];
        }

        return $this->redirect($url);
    }