Delete all static host tags

@return self Returns itself

@throws Exception on error
516439
public function deleteAll() {
        $tags = $this->read();

        $ids = [];

        foreach ($tags as $tag) {
            $ids[] = $tag['id'];
        }

        if (count($ids) > 0) {
            $this->batchDelete($ids);
        }

        return $this;
    }
1176941
public function delete()
    {
        $url = $this->url;
        if (!empty($this->replaceParams)) {
            $url = self::buildUri($url, $this->replaceParams);
        }
        $this->adapter->setResponseTimeout($this->getResponseTimeout());
        $this->adapter->setConnectTimeout($this->getConnectTimeout());

        return $this->adapter->delete(
            $url,
            array(
                self::HEADERS => $this->headers,
            )
        );
    }
811034
public function untag($tags = null)
    {
        if (empty($tags)) {
            return $this->_updateTags([], 'replace');
        }

        $table = TableRegistry::getTableLocator()->get($this->source());
        $behavior = $table->behaviors()->Tag;
        $assoc = $table->getAssociation($behavior->getConfig('tagsAlias'));
        $property = $assoc->getProperty();
        $id = $this->get($table->getPrimaryKey());
        $untags = $behavior->normalizeTags($tags);

        $tags = $this->get($property);
        if (!$tags) {
            $contain = [$behavior->getConfig('tagsAlias')];
            $tags = $table->get($id, compact('contain'))->get($property);
        }

        $tagsTable = $table->{$behavior->getConfig('tagsAlias')};
        $pk = $tagsTable->getPrimaryKey();
        $df = $tagsTable->getDisplayField();

        foreach ($tags as $k => $tag) {
            $tags[$k] = [
                $pk => $tag->{$pk},
                $df => $tag->{$df},
            ];
        }

        foreach ($untags as $untag) {
            foreach ($tags as $k => $tag) {
                if ((empty($untag[$pk]) || $tag[$pk] === $untag[$pk]) &&
                    (empty($untag[$df]) || $tag[$df] === $untag[$df])
                ) {
                    unset($tags[$k]);
                }
            }
        }

        return $this->_updateTags(
            array_map(
                function ($i) {
                    return implode(':', $i);
                },
                $tags
            ),
            'replace'
        );
    }
1313829
public function performBan()
    {
        if (!$this->_getHelper()->isActive()) {
            return $this;
        }
        
        $tagsToBan = array_unique($this->_getProcessor()->getTagsToBan());
        if ($tagsToBan) {
            try {
                $tagsToBan = array_map(
                    array(Mage::helper('ecomdev_varnish'), 'formatObjectTag'),
                    $tagsToBan
                );
                
                $queue = Mage::app()->getCache()->load(self::VARNISH_CACHE_QUEUE, true);
                
                if ($queue) {
                    $queue = unserialize($queue);
                    foreach ($tagsToBan as $tag) {
                        $queue[] = $tag;
                    }
                } else {
                    $queue = $tagsToBan;
                }
                
                $queue = serialize($queue);
                
                Mage::app()->getCache()->save($queue, self::VARNISH_CACHE_QUEUE);
            } catch (Exception $e) {
                Mage::logException($e);
            }
        }
        
        return $this;
    }
153740
public function actionCleanup()
    {
        $tagIds = Tag::find()->select(['id'])->column();

        $batch = TagRelation::find()->batch();
        $i = 0;
        $delete = 0;
        foreach ($batch as $rows) {
            foreach ($rows as $relation) {
                $i++;
                // check if tag id exists in table
                if (!in_array($relation->tag_id, $tagIds)) {
                    $relation->delete();
                    $delete++;
                    continue;
                }

                $prefixedTableName = '{{%'.$relation->table_name.'}}';
                $pk = $this->tableSchema($prefixedTableName)->primaryKey;
                $query = (new Query())
                    ->from($prefixedTableName)
                    ->where([current($pk) => $relation->pk_id]) // provide model mapping or read pk name from schema
                    ->exists();

                if (!$query) {
                    $relation->delete();
                    $delete++;
                }

                unset($relation, $prefixedTableName, $pk, $query);
            }
        }

        return $this->outputSuccess("{$i} items checked and {$delete} items deleted.");
    }
930855
public function deletePage()
    {
        // Get dependencies
        $pageMapper = ($this->container->dataMapper)('PageMapper');
        $pageElementMapper = ($this->container->dataMapper)('PageElementMapper');
        $pageSettingMapper = ($this->container->dataMapper)('PageSettingMapper');

        $pageId = empty($this->request->getParsedBodyParam('id')) ? null : $this->request->getParsedBodyParam('id');

        if (null !== $pageId) {
            // Ensure this is not the home page
            $page = $pageMapper->findById($pageId);

            if ($page->slug === 'home') {
                throw new Exception('PitonCMS: Cannot delete home page');
            }

            // Delete page
            $pageMapper->delete($page);

            // Delete page elements & page settings
            $pageElementMapper->deleteElementsByPageId($pageId);
            $pageSettingMapper->deleteByPageId($pageId);
        }

        // Redirect back to show pages
        return $this->redirect('adminPages');
    }
93123
public function clear() {
		$this->_value = null;
		$this->getConnection()->getClient()->delete($this->name);
		return $this;
	}
273603
public function deleteAll() {
        $instances = $this->read();

        $ids = [];

        foreach ($instances as $instance) {
            $ids[] = $instance['id'];
        }

        if (count($ids) > 0) {
            $this->batchDelete($ids);
        }

        return $this;
    }
943950
def remove_all_static_host_mappings():
    """"""

    LOG.debug("remove_host_mapping() called")
    session = bc.get_writer_session()
    try:
        mapping = _lookup_all_host_mappings(
                      session=session,
                      is_static=True)
        for host in mapping:
            session.delete(host)
        session.flush()
    except c_exc.NexusHostMappingNotFound:
        pass
141174
def remove_tag_all(self, resource_type, resource_id, **_params):
        """"""
        return self.delete(self.tags_path % (resource_type, resource_id))
159249
public function clean(string $allowedTags = null): Utility
    {
        $string = strip_tags(trim($this->string), $allowedTags);

        return new static($string, $this->encoding);
    }
882931
protected function clear()
    {
        $this->scheme       = null;
        $this->host         = null;
        $this->port         = null;
        $this->user         = null;
        $this->pass         = null;
        $this->pathSegments = [];
        $this->parameters   = [];
        $this->fragment     = null;
        $this->orignalValue = $this->returnValue  = '';
        return $this->parse();
    }
1286283
static function cleanup()
    {
        $http = eZHTTPTool::instance();

        $http->removeSessionVariable( 'CanInstantiateClassList' );
        $http->removeSessionVariable( 'ClassesCachedForUser' );

        // Note: This must be done more generic with an internal
        //       callback system.
        eZPreferences::sessionCleanup();
    }
1063859
public function deleteAll()
    {
        if ($this->loaded()) {
            $this->unload();
        }
        $this->hook('beforeDeleteAll');
        $this->controller->deleteAll($this);
        $this->hook('afterDeleteAll');

        return $this;
    }
329882
public function forget(string $name) : self
    {
        foreach ($this->tags as $key => $tag) {
            if ($tag->name == $name) {
                unset($this->tags[$key]);
            }
        }

        return $this;
    }
1014856
public function clear()
    {
        $tagName = $this->tagName();
        switch ($tagName) {
            case 'input':
            case 'textarea':
                $this->sendCommand('element/:id/clear', WebDriver_Command::METHOD_POST);
                break;
            case 'select':
                $this->child("xpath=descendant::option[1]")->click();
                break;
        }
        return $this;
    }
425848
public function delete(){

        $query= /** @lang text */
            'DELETE FROM '.self::sanitize(static::$table);


        if (!empty($this->whereby)) {

            $query = $query . ' WHERE ' . $this->whereby;
        }

        try {
            $this->exec($query);

            static::$response["status"] = "success";
            static::$response["response"] = 'success';
            static::$response['code'] = 200;
            return static::terminate(static::$response);
        } catch (Exception $e) {
            static::$response["status"] = "error";
            static::$response["response"] = $e->getMessage();
            static::$response['code'] = $e->getCode();
            return static::terminate(static::$response);
        }
    }