# woo-mailerlite/2.0/includes/classes/Singleton.php

MailerLite – WooCommerce integration, version 2.0. 34 lines.

- Page: https://pluginprobe.com/plugins/woo-mailerlite/2.0/code/includes/classes/Singleton.php
- Raw: https://pluginprobe.com/plugins/woo-mailerlite/2.0/raw/includes/classes/Singleton.php
- Modified: 2023-07-25T07:49:04+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/woo-mailerlite/2.0/code/includes/classes/Singleton.php#L10-L20`.

```php
<?php

namespace MailerLite\Includes\Classes;

abstract class Singleton
{

    /**
     * Class instance
     * @var $instance
     */
    protected static $instance;

    private function __construct()
    {
    }

    /**
     * Get the instance of the class
     * @return mixed
     */
    public static function getInstance()
    {
        if ( ! static::$instance instanceof static) {
            static::$instance = new static();
        }

        return static::$instance;
    }

    final protected function __clone()
    {
    }
}
```
