<?php

namespace RistrettoApps\Spawnster\Services;

use RistrettoApps\Spawnster\Base\Constants;

class AjaxHandler
{
    public static function updateMenu($id, $value)
    {
        $menu = unserialize(get_option(Constants::SPAWNSTER_PAGE_NAME_REQUEST));
        $menu[$id] = $value;
        update_option(Constants::SPAWNSTER_PAGE_NAME_REQUEST, serialize($menu));
    }
}