You are here

public function FastlyCommands::purgeService in Fastly 8.3

Purge whole service.

@command fastly:purge:service @aliases fpservice

File

src/Commands/FastlyCommands.php, line 104

Class

FastlyCommands
Provides drush commands for Fastly.

Namespace

Drupal\fastly\Commands

Code

public function purgeService() {
  if ($this->api
    ->purgeAll(FALSE)) {
    $this
      ->output()
      ->writeln("<info>Successfully purged whole service on Fastly.</info>");
  }
  else {
    $this
      ->output()
      ->writeln("<error>Unable to purge whole service on Fastly.</error>");
  }
}