InvalidBundleException.php 761B

123456789101112131415161718192021222324252627
  1. <?php
  2. /*
  3. * This file is part of the Symfony framework.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace Symfony\Bundle\AsseticBundle\Exception;
  11. class InvalidBundleException extends \LogicException
  12. {
  13. public function __construct($bundle, $usage, $template, array $enabled, $code = 0, \Exception $previous = null)
  14. {
  15. $message = sprintf('You must add %s to the assetic.bundle config to use %s in %s.', $bundle, $usage, $template);
  16. if ($enabled) {
  17. $message .= sprintf(' (currently enabled: %s)', implode(', ', $enabled));
  18. }
  19. parent::__construct($message, $code, $previous);
  20. }
  21. }