DriverException.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Gedmo\Mapping;
  3. /**
  4. * The mapping exception list extension driver mapping
  5. *
  6. * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
  7. * @package Gedmo.Mapping
  8. * @subpackage DriverException
  9. * @link http://www.gediminasm.org
  10. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  11. */
  12. class DriverException extends \Exception
  13. {
  14. static public function annotationDriverNotFound($driverClassName)
  15. {
  16. return new self("Extension annotation driver: ({$driverClassName}) was not found.");
  17. }
  18. static public function invalidEntity($className)
  19. {
  20. return new self('Class ' . $className . ' is not a valid entity or mapped super class.');
  21. }
  22. static public function mappingFileNotFound($fileName, $className)
  23. {
  24. return new self("No mapping file found named '$fileName' for class '$className'.");
  25. }
  26. static public function extensionDriverNotSupported($driverClassName, $driverName)
  27. {
  28. return new self("Driver: ({$driverName}) currently is not supported for extension metadata parsing. Failed to initialize: {$driverClassName}");
  29. }
  30. }