Weak hands cannot be planted, meager skills have no foundation. Shallow wisdom is futile, how can one hope for a good name?扰扰从役倦，屑屑身事微。少壮轻年月，迟暮惜光辉。
<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><?php

namespace WP_Statistics\Abstracts;

use WP_Statistics\Exception\SystemErrorException;
use WP_Statistics\Utils\Request;

abstract class BaseTabView extends BaseView
{
    protected $defaultTab;
    protected $tabs;

    public function __construct()
    {
        // Throw error when invalid tab provided
        if (!in_array($this->getCurrentTab(), $this->tabs)) {
            throw new SystemErrorException(
                esc_html__('Invalid tab provided.', 'wp-statistics')
            );
        }
    }

    /**
     * Retrieves the current tab.
     *
     * @param string $tab The current tab.
     * @return string The current tab.
     */
    public function getCurrentTab()
    {
        return Request::get('tab', $this->defaultTab);
    }

    /**
     * Checks whether the current tab matches the given tab.
     *
     * @param string|array $tab The tab to check against the current tab, or tabs.
     * @return bool True if the current tab matches the given tab, false otherwise.
     */
    protected function isTab($tab)
    {
        $activeTab = $this->getCurrentTab();

        // If given tab is an array, check if it contains current tab.
        if (is_array($tab)) {
            return in_array($activeTab, $tab);
        }

        return $activeTab === $tab;
    }

    /**
     * Retrieves data for the current tab. For