Remove an item

@since   1.1
@param   int|string $indexOrName Index or name of key
@return  bool True if success or false if not exist
517704
public function remove($indexOrName)
    {
        if (isset($this->arrayVar[$indexOrName])) {
            unset($this->arrayVar[$indexOrName]);
            return true;
        }
        return false;
    }
1291170
public function deleteType($indexName, $typeName)
    {
        $client = $this->getClient();
        $index = $client->getIndex($indexName);
        $type = $index->getType($typeName);

        return $type->delete();
    }
861484
public boolean deleteIndex(String indexName) {
        DeleteIndexResponse response =
                getClient().admin().indices().prepareDelete(indexName).execute().actionGet();
        return response.isAcknowledged();
    }
1321334
public function removeAuthItem($name)
	{
		if(isset($this->_items[$name]))
		{
			foreach($this->_children as &$children)
				unset($children[$name]);
			foreach($this->_assignments as &$assignments)
				unset($assignments[$name]);
			unset($this->_items[$name]);
			return true;
		}
		else
			return false;
	}
111588
public function remove($indexValue)
    {
        if (\is_object($indexValue)) {
            foreach ($this->arrCollection as $collectionIndex => $model) {
                if ($indexValue === $model) {
                    unset($this->arrCollection[$collectionIndex]);
                }
            }
        } else {
            unset($this->arrCollection[$indexValue]);
        }

        $this->arrCollection = \array_values($this->arrCollection);
    }
464842
public function remove_element($elementname) {
        if ($this->_form->elementExists($elementname)) {
            return $this->_form->removeElement($elementname);
        } else {
            return false;
        }
    }
91254
public function removeFromIndex(Searchable $subject, $indexName = null)
    {
        $indexName = $this->resolveIndexName($indexName);

        $this->elasticsearch->delete(
            [
                'index' => $indexName,
                'type'  => $subject->getSearchableType(),
                'id'    => $subject->getSearchableId(),
            ]
        );
    }
298920
public function remove($index)
    {
        if($index >= $this->count())
            throw new OutOfRangeException('Index out of range');

        array_splice($this->_collection, $index, 1);
    }
1114673
public function dropIndex($indexHandle)
    {
        $handle = explode('/', $indexHandle);
        $this->getConnection()->delete(UrlHelper::buildUrl(Urls::URL_INDEX, [$handle[0], $handle[1]]));

        return true;
    }
237035
public function removeName($nameIndex)
    {
        $removed = false;
        $lines = $this->lines;
        foreach ($lines as $line) {
            if ($line->removeName($nameIndex)) {
                $removed = true;
            }
        }
        $this->sMappings = null;
        return $removed;
    }
739724
private function removeExisting(Index $index, Document $document)
    {
        $hits = $index->find(self::ID_FIELDNAME . ':' . $document->getId());

        foreach ($hits as $hit) {
            $index->delete($hit->id);
        }
    }
306564
public function remove($key)
    {
        if (is_null($key)) {
            throw new InvalidArgumentException("Can't add NULL {$this->name}.");
        }

        if (!is_null($id = $this->search($key))) {
            unset($this->items[$id]);
            return true;
        }

        return false;
    }
603634
public function removeListener($eventName, $listener = null)
    {
        $eventName = $this->cleanEventName($eventName);

        if (!array_key_exists($eventName, $this->_list)) {
            return false;
        }

        foreach ($this->_list[$eventName] as $index => $eventData) {

            if ($eventData[1] === $listener) {
                unset($this->_list[$eventName][$index]);
                return true;
            }
        }

        return false;
    }
255308
protected function removeItem(string $key): bool
    {
        if (!$this->has($key)) {
            return false;
        }

        unset($this->items[$key]);

        return true;
    }
665685
public function removeRole($idOrName)
    {
        $ids = is_array($idOrName) ? $idOrName : func_get_args();

        foreach ($ids as $search) {
            $role = Role::search($search)->firstOrFail();

            $this->roles()->detach($role->id);
        }
    }
388687
public function removeIndex()
    {
        try {
            return $this->getElasticClient()->delete($this->basicElasticParams(true));
        }
        catch (Missing404Exception $e) {
            return false;
        }
    }
827200
public function clearIndex($indexName = null)
    {
        $indexName = $this->resolveIndexName($indexName);

        $this->elasticsearch->indices()->delete(['index' => $indexName]);
    }