ExtensionsCheckerTrait.php 673 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\App\Traits;
  3. use ThurData\Servers\KerioEmail\App\Libs\Restrictions\Restriction;
  4. use ThurData\Servers\KerioEmail\App\Libs\Restrictions\Rules\ExtensionsValid;
  5. /**
  6. *
  7. * Created by PhpStorm.
  8. * User: Tomasz Bielecki ( tomasz.bi@thurdata.com )
  9. * Date: 07.11.19
  10. * Time: 09:54
  11. * Class ExtensionsCheckerTrait
  12. */
  13. trait ExtensionsCheckerTrait
  14. {
  15. /**
  16. *
  17. * check about module extensions
  18. * @throws \Exception
  19. */
  20. public function checkExtensionOrThrowError()
  21. {
  22. $restriction = new Restriction(new ExtensionsValid());
  23. $restriction->enableThrowError();
  24. $restriction->check();
  25. }
  26. }