<?php
/**
 * Installer class
 *
 * @package UPPSAE
 */
namespace DynamicLayers\UPPSAE\Classes;

class Installer {

    /**
     * Run the installer
     *
     * @return void
     */
    public function run() {
        $this->add_version();
    }

    /**
     * Add time and version on DB
     */
    public function add_version() {
        $installed = get_option( 'uppsae_installed' );

        if ( ! $installed ) {
            update_option( 'uppsae_installed', time() );
        }

        update_option( 'uppsae_installed', UPPSAE_VERSION );
    }
}
