public function register(string $action, string $class, string $method, array $args = [])
    {
        if (!$action || !$class || !$method) {
            throw $this->c::issue('Action args empty.');
        }
        if (($via_api = $this->viaApi($action))) {
            $action = $this->stripApiVersion($action);
        }
        $default_args = [ // API = no nonce (default).
            'requires_valid_nonce' => $via_api ? false : true,
        ];
        $args = array_merge($default_args, $args);
        $args = array_intersect_key($args, $default_args);

        $this->registered_actions[$action] = array_merge($args, compact('class', 'method'));
    }