PATH:
home
/
sparklp6
/
public_html
/
website_356c8563
/
nitropack
/
nitropack-sdk
/
NitroPack
/
SDK
/
Api
<?php namespace NitroPack\SDK\Api; class SafeMode extends SignedBase { public function status() { $path = 'safemode/status/' . $this->siteId; $httpResponse = $this->makeRequest($path); $status = ResponseStatus::getStatus($httpResponse->getStatusCode()); switch ($status) { case ResponseStatus::OK: return json_decode($httpResponse->getBody()); default: $this->throwException($httpResponse, 'Error while enabling safe mode: %s'); } } public function enable() { $path = 'safemode/enable/' . $this->siteId; $httpResponse = $this->makeRequest($path, array(), array(), 'POST'); $status = ResponseStatus::getStatus($httpResponse->getStatusCode()); switch ($status) { case ResponseStatus::OK: return true; default: $this->throwException($httpResponse, 'Error while enabling safe mode: %s'); } } public function disable() { $path = 'safemode/disable/' . $this->siteId; $httpResponse = $this->makeRequest($path, array(), array(), 'POST'); $status = ResponseStatus::getStatus($httpResponse->getStatusCode()); switch ($status) { case ResponseStatus::OK: return true; default: $this->throwException($httpResponse, 'Error while disabling safe mode: %s'); } } }
[-] Webhook.php
[edit]
[-] SignedBase.php
[edit]
[-] ExcludedUrls.php
[edit]
[-] .htaccess
[edit]
[-] Excludes.php
[edit]
[-] AdditionalDomains.php
[edit]
[-] Varnish.php
[edit]
[-] Stats.php
[edit]
[-] Tagger.php
[edit]
[-] ResponseStatus.php
[edit]
[-] Integration.php
[edit]
[-] SafeMode.php
[edit]
[-] SecureRequestMaker.php
[edit]
[-] Warmup.php
[edit]
[-] Cache.php
[edit]
[-] RemoteConfigFetcher.php
[edit]
[-] Base.php
[edit]
[-] VariationCookie.php
[edit]
[-] Response.php
[edit]
[-] Url.php
[edit]
[+]
..
[-] RequestMaker.php
[edit]