public static function deserialize(array $config)
    {
        if (isset($config['class']) && isset($config['config'])) {
            $config = $config['config'];
        }
        $instance = new self();
        $instance->loadConfig($config);
        return $instance;
    }