<?php

namespace ModulesGarden\Servers\OpenXchange\App\Traits;


use ModulesGarden\Servers\OpenXchange\App\Libs\Restrictions\Restriction;
use ModulesGarden\Servers\OpenXchange\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();
    }

}