<?php

namespace Snaatch\Typo3\Utility;

use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException;
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Utility\GeneralUtility;

class ConfigurationUtility
{
  const EXTENSION = 'snaatch_typo3';

  /**
   * @throws ExtensionConfigurationPathDoesNotExistException
   * @throws ExtensionConfigurationExtensionNotConfiguredException
   */
  public static function getExtensionConfiguration(): array
  {
    return GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::EXTENSION);
  }
}
