# hostinger/3.0.2/includes/Cli.php

Hostinger Tools, version 3.0.2. 28 lines.

- Page: https://pluginprobe.com/plugins/hostinger/3.0.2/code/includes/Cli.php
- Raw: https://pluginprobe.com/plugins/hostinger/3.0.2/raw/includes/Cli.php
- Modified: 2024-06-04T12:01:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/hostinger/3.0.2/code/includes/Cli.php#L10-L20`.

```php
<?php

namespace Hostinger;

use WP_CLI;

defined( 'ABSPATH' ) || exit;

class Cli {
    /**
     * Load required files and hooks to make the CLI work.
     */
    public function __construct() {
		$this->hooks();
	}

    /**
     * Sets up and hooks WP CLI to our CLI code.
     *
     * @return void
     */
	private function hooks(): void {
		if ( class_exists( '\WP_CLI' ) ) {
			WP_CLI::add_hook( 'after_wp_load', array( 'Hostinger\Cli\Commands\Maintenance', 'define_command' ) );
		}
	}
}

```
