final public static function getInstance()
    {
        $cls = static::class;
        if (isset(static::$instances[$cls])) {
            return static::$instances[$cls];
        }

        if ($cls === self::class) {
            throw new \LogicException("$cls cannot be used directly. Please subclass in your project.");
        }

        return static::$instances[$cls] = static::create();
    }