| Server IP : 172.67.134.116 / Your IP : 216.73.217.22 Web Server : Apache System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : nobi37te ( 1003) PHP Version : 8.2.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/nobi37te/public_html/wp-content/plugins/nitropack/classes/Integration/Hosting/ |
Upload File : |
<?php
namespace NitroPack\Integration\Hosting;
class RocketNet extends Hosting {
const STAGE = "early";
public static function detect() {
return defined("ROCKET_SITE_ID") || strpos(gethostname(), "onrocket.com") !== false;
}
public function init($stage) {
if ($this->getHosting() == "rocketnet") {
if (class_exists("CDN_Clear_Cache_Api")) {
add_action('nitropack_execute_purge_url', [$this, 'purgeUrl']);
}
if (class_exists("CDN_Clear_Cache_Hooks")) {
add_action('nitropack_execute_purge_all', [$this, 'purgeAll']);
}
}
}
public function purgeUrl($url) {
$urlObj = new \NitroPack\Url\Url($url);
$entry = $urlObj->getPath();
if ($urlObj->getQuery()) {
$entry .= "?" . $urlObj->getQuery();
}
\CDN_Clear_Cache_Api::cache_api_call([$entry], 'purge');
}
public function purgeAll() {
\CDN_Clear_Cache_Hooks::purge_cache();
}
}