You are here

public function TrafficRegistry::remove in URLs queuer 8

Remove a URL or path from the registry.

Parameters

string $url_or_path: The URL or path string to remove from the registry.

Overrides TrafficRegistryInterface::remove

File

src/TrafficRegistry.php, line 65

Class

TrafficRegistry
Provides a database-driven traffic registry with URLs and tags.

Namespace

Drupal\purge_queuer_url

Code

public function remove($url_or_path) {
  if (!$this->connection
    ->schema()
    ->tableExists('purge_queuer_url')) {
    return;
  }
  if (empty(trim($url_or_path))) {
    return;
  }
  $this->connection
    ->delete('purge_queuer_url')
    ->condition('url', $url_or_path)
    ->execute();
}