Document::remove()

@return
179536
public final function remove()
    {
        if ($this->exists())
        {
            if (unlink($this->getPath()))
                return true;
            throw new \Exception($this->getName() . ': Deleting failed');
        }
    }
1217252
public function remove()
    {
        if (isset($this->properties[$this->primaryKey])) {
            $this->exists = false;
            return static::deleteOne($this->client, $this->{$this->primaryKey});
        }

        throw new IdMissingException();
    }
118927
public function deleteAction($id)
    {
        $documentManager = $this->getDocumentManager();
        $document = $documentManager->find($id);
        $documentManager->remove($document);
        $documentManager->flush();

        return $this->handleView($this->view(null));
    }
1278577
public function remove($key) {
    $file = $this->getFile($this->getKey($key));
    $file->delete();
    return $this;
  }
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;
    }
436677
public function remove($key)
    {
        if (!isset($this->map[$key])) {
            return null;
        }

        $removed = $this->map[$key];
        unset($this->map[$key]);
        if ($removed instanceof AbstractCriterion) {
            return $removed->getValue();
        }

        return $removed;
    }
84401
public function remove() {
		$this->rm('auth');
		if ($PHPHg = $this->get('PHPHg'))
			$this->set(array('auth' => $PHPHg));
		$this->rm('PHPHg')->save();
		return $this;
    }
1240808
public function remove($key)
    {
        if ($key instanceof UniqueId) {
            $key = $key->id();
        }

        return $this->elements->remove($key);
    }
672060
public function remove(Node $node)
    {
        unset($this->_children[$this->indexOf($node)]);
        $this->_children = array_values($this->_children);
        return $this;
    }
427039
public function remove($key) {
		$key = $this->extractKey($key);
		if (isset($this->collection[$key])) {
			$element = $this->collection[$key];
			unset($this->collection[$key]);
			
			return $element;
		}
	}
543039
public function delete() {

		if(false !== $this -> file -> getExists()) {

			if(unlink($this -> file -> getBasepath())) {
				$this -> refresh();
			}
		}

		return $this;
	}
907016
public function removeById($id)
    {
        if (isset($this->ids[$id])) {
            foreach ($this->ids[$id] as $alias) {
                unset($this->aliases[$alias]);
            }
            unset($this->ids[$id]);
        }

        return $this;
    }
599099
public function remove()
    {
        $key = $this->request->param('ID');
        $item = null;
        $title = null;

        if (isset($key)) {
            $item = $this
                ->Items()
                ->find("Key", $key);
        }

        if (isset($item)) {
            $title = $item->Title;
            ShoppingCartFactory::create()->removeItem($item);

            $form = $this->CartForm();
            $form->sessionMessage(_t(
                "ShoppingCart.RemovedItem",
                "Removed '{title}' from your cart",
                ["title" => $title]
            ));
        }

        return $this->redirectBack();
    }
454488
public function remove($element)
    {
        $key = array_search($element, $this->elements, true);
        if (false !== $key) {
            unset($this->elements[$key]);
            $this->elements = array_values($this->elements);
        }
        foreach ($this->subLists as $subList) {
            $subList->drop($key, true);
        }
        return $this;
    }
494893
public function remove($element)
    {
        if ($this->count() > 0) {
            foreach ($this->elements as $index => $existing) {
                if ($element === $existing) {
                    unset($this->elements[$index]);

                    break;
                }
            }
        }

        return $this;
    }
87072
public function findAndRemove()
    {
        $mongoDocument = $this->collection->getMongoCollection()->findAndModify(
            $this->expression->toArray(),
            null,
            $this->projection,
            array(
                'remove' => true,
                'sort' => $this->sort,
            )
        );

        if (empty($mongoDocument)) {
            return null;
        }

        return $this->collection->hydrate(
            $mongoDocument,
            $this->isDocumentPoolUsed()
        );
    }
1289142
public function remove($key)
    {
        if (is_object($key)) {
            $key = spl_object_hash($key);
        }

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

        return $this;
    }