<?php

namespace ModulesGarden\Servers\ZimbraEmail\App\Traits;


use ModulesGarden\Servers\ZimbraEmail\App\Libs\Restrictions\Restriction;
use ModulesGarden\Servers\ZimbraEmail\App\Libs\Restrictions\Rules\ExtensionsValid;

/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * 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();
    }

}