PluginProbe
Hostinger Tools / 3.0.8
Hostinger Tools v3.0.8
3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.4 All 108 releases
hostinger / includes / Hostinger.php

Hostinger.php in Hostinger Tools 3.0.8, at includes/Hostinger.php

52 lines 967 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Hostinger;
4
5 use Hostinger\Bootstrap;
6
7 defined( 'ABSPATH' ) || exit;
8
9 class Hostinger {
10 protected string $plugin_name = 'Hostinger';
11 protected string $version;
12
13 /**
14 * @return void
15 */
16 public function bootstrap(): void {
17 $this->version = $this->get_plugin_version();
18 $bootstrap = new Bootstrap();
19 $bootstrap->run();
20 }
21
22 /**
23 * @return void
24 */
25 public function run(): void {
26 $this->bootstrap();
27 }
28 /** PHPCS:disable WordPress.NamingConventions.PrefixAllGlobals.VariableConstantNameFound */
29 /**
30 * Define constant
31 *
32 * @param string $name Constant name.
33 * @param string|bool $value Constant value.
34 */
35 private function define( string $name, $value ): void {
36 if ( ! defined( $name ) ) {
37 define( $name, $value );
38 }
39 }
40 /** PHPCS:enable */
41 /**
42 * @return string
43 */
44 private function get_plugin_version(): string {
45 if ( defined( 'HOSTINGER_VERSION' ) ) {
46 return HOSTINGER_VERSION;
47 }
48
49 return '1.0.0';
50 }
51 }
52