You are here

public function VclHandler::getAllSnippets in Fastly 8.3

Get all snippets.

Parameters

null $version:

Return value

mixed

1 call to VclHandler::getAllSnippets()
VclHandler::removeEdgeModule in src/VclHandler.php
Remove edge module

File

src/VclHandler.php, line 1220

Class

VclHandler
Class to control the VCL handling.

Namespace

Drupal\fastly

Code

public function getAllSnippets($version = null) {
  $v = is_null($version) ? $this
    ->getLastVersion()->number : $version;
  $url = $this->versionBaseUrl . "/" . $v . "/snippet";
  $response = $this
    ->vclGetWrapper($url, $this->headersGet);
  $responseBody = (string) $response
    ->getBody();
  return json_decode($responseBody);
}