Closte.php
4 years ago
Cloudways.php
4 years ago
Flywheel.php
4 years ago
GoDaddyWPaaS.php
4 years ago
GridPane.php
4 years ago
Hosting.php
4 years ago
Kinsta.php
4 years ago
Pagely.php
4 years ago
PagelyCachePurge.php
4 years ago
Pressable.php
4 years ago
RocketNet.php
4 years ago
Savvii.php
4 years ago
SiteGround.php
4 years ago
Vimexx.php
4 years ago
WPEngine.php
4 years ago
WPX.php
4 years ago
RocketNet.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | namespace NitroPack\Integration\Hosting; |
| 4 | |
| 5 | class RocketNet extends Hosting { |
| 6 | const STAGE = "early"; |
| 7 | |
| 8 | public static function detect() { |
| 9 | return defined("ROCKET_SITE_ID") || strpos(gethostname(), "onrocket.com") !== false; |
| 10 | } |
| 11 | |
| 12 | public function init($stage) { |
| 13 | if ($this->getHosting() == "rocketnet" && class_exists("\Rocket_Wordpress")) { |
| 14 | add_action('nitropack_execute_purge_url', [$this, 'purgeUrl']); |
| 15 | add_action('nitropack_execute_purge_all', [$this, 'purgeAll']); |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | public function purgeUrl($url) { |
| 20 | \NitroPack\Integration\Plugin\RocketNet_Helper::purgeUrl($url); |
| 21 | } |
| 22 | |
| 23 | public function purgeAll() { |
| 24 | \Rocket_Wordpress::purge_cache(); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 |