protected function fetchFromArray(
        array $array,
        string $index = '',
        $xss_clean = false
    ) {
        if (!array_key_exists($index, $array)) {
            return false;
        }

        // Checks to see if the variable is set, since 0 returns as false.
        if ($xss_clean === 'isset') {
            return array_key_exists($index, $array);
        }

        return $array[$index];
    }