<?php

namespace ThurData\Servers\KerioEmail\App\Traits;


use ThurData\Servers\KerioEmail\App\Libs\Restrictions\Restriction;
use ThurData\Servers\KerioEmail\App\Libs\Restrictions\Rules\ExtensionsValid;

/**
 *
 * Created by PhpStorm.
 * User: ThurData
 * Date: 07.11.19
 * Time: 09:54
 * Class ExtensionsCheckerTrait
 */
trait ExtensionsCheckerTrait
{

    /**
     *
     * check about module extensions
     * @throws \Exception
     */
    public function checkExtensionOrThrowError()
    {
        $restriction = new Restriction(new ExtensionsValid());
        $restriction->enableThrowError();
        $restriction->check();
    }

}