Removes a target from the collection.

If the target does not exist, this method does nothing.

@param string $targetName The target name.
323642
public function remove($targetName)
    {
        if (InstallTarget::DEFAULT_TARGET === $targetName && $this->defaultTarget) {
            $targetName = $this->defaultTarget->getName();
        }

        unset($this->targets[$targetName]);

        if ($this->defaultTarget && $targetName === $this->defaultTarget->getName()) {
            $this->defaultTarget = $this->targets ? reset($this->targets) : null;
        }
    }
231915
public static function remove($target)
    {
        if (is_dir($target)) {
            $files = glob($target . '*', GLOB_MARK);
            foreach ($files as $file) {
                self::remove($file);
            }
            @rmdir($target);
        } else {
            if (is_file($target)) {
                @unlink($target);
            }
        }
    }
101088
public function deleteCommand($hostname)
    {
        $domains = $this->findDomainsByHostnamePattern($hostname);
        if (empty($domains)) {
            $this->outputLine('<error>No domain found for hostname-pattern "%s".</error>', [$hostname]);
            $this->quit(1);
        }
        foreach ($domains as $domain) {
            $site = $domain->getSite();
            if ($site->getPrimaryDomain() === $domain) {
                $site->setPrimaryDomain(null);
                $this->siteRepository->update($site);
            }
            $this->domainRepository->remove($domain);
            $this->outputLine('Domain entry "%s" deleted.', [$domain->getHostname()]);
        }
    }
339988
public function remove($name): void
    {
        if ($this->contains($name) == false) {
            return;
        }

        unset($this->record[$name]);
    }
638872
public function remove($name)
    {
        $names = (array)$name;

        foreach ($names as $name) {
            if (Arr::key($name, $this->_assets)) {
                unset($this->_assets[$name]);
            }
        }
    }
109704
public function removeItems($eventName)
    {
        if (!isset($this->items[$eventName])) {
            return false;
        }
        
        // Remove the event
        unset($this->items[$eventName]);
        
        // Save the items
        $this->saveItems();
    }
1040740
protected function remove($filterOrName)
    {
        $name = $this->getNameByFilter($filterOrName);

        if ($this->has($name)) {
            unset($this->collection[$name]);

            return true;
        }

        return false;
    }
1255354
public function removeTag($tagName)
    {
        if ($this->tags !== null && array_key_exists($tagName, $this->tags)) {
            unset($this->tags[$tagName]);
        }
    }
947789
public function dropMorphs($name, $indexName = null)
    {
        $this->dropIndex($indexName ?: $this->createIndexName('index', ["{$name}_type", "{$name}_id"]));

        $this->dropColumn("{$name}_type", "{$name}_id");
    }
1226505
public static function clear($filename)
    {
        $filename = static::path($filename);

        if (!file_exists($filename)) {
            return;
        }

        if (!unlink($filename)) {
            throw new \Exception("Unable to delete file (" . $filename . ")");
        }
    }
674752
public function removeGroup($groupName)
    {

		if(isset($this->groups[$groupName])){
			foreach($this->groups[$groupName]['elements'] as $element){
				$this->removeElement($element);
			}
			unset($this->groups[$groupName]);
		}

    }
494769
public function removeEdge( $source, $target )
	{
		if( $this->isEdge( $source, $target ) )
			$this->edgeSet->removeEdge( $source, $target );
	}
322510
def remove(self):
        
        session = client.get_client().create_session()

        if not self._base_query(session).count() > 0:
            session.close()
            raise RuntimeError("Target does not exist, name={:s}, params={:s}"
                               "".format(self.name, self.params))

        # remove the target from the database
        self._base_query(session).delete()
        session.commit()

        session.close()
899186
public function delete($filename)
    {

        $dirname  = pathinfo($filename, PATHINFO_DIRNAME);
        $basename = pathinfo($filename, PATHINFO_BASENAME);

        $file_name = substr($basename, 0, strrpos($basename, '.'));

        $files = $this->storage->files($dirname);

        foreach ($files as $value) {
            $value_basename = pathinfo($value, PATHINFO_BASENAME);
            $name           = substr($value_basename, 0, strrpos($value_basename, '-'));

            if ($name == $file_name) {
                $this->storage->delete($value);
            }
        }

    }
41259
public function removeListeners($eventName = null)
    {
        if (null !== $eventName) {
            $eventName = $this->cleanEventName($eventName);
        }

        if (array_key_exists($eventName, $this->_list)) {
            unset($this->_list[$eventName]);
        } else {
            $this->_list = array();
        }
    }
212055
public function emptyDir($dirname)
    {
        $contents = $this->listContents($dirname);

        foreach ($contents as $item) {
            if ($item['type'] === 'dir') {
                $this->deleteDir($item['path']);
            } else {
                $this->delete($item['path']);
            }
        }
    }
120204
public function deleteFiles($target)
    {
        if (is_dir($target)) {
            $files = glob($target . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned

            foreach ($files as $file) {
                $this->deleteFiles($file);
            }

            if (is_dir($target)) {
                rmdir($target);
            }

        } elseif (is_file($target)) {
            unlink($target);
        }
    }