UnCloneableAsset.php 589 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace DoctrineTest\InstantiatorTestAsset;
  3. use BadMethodCallException;
  4. /**
  5. * Base un-cloneable asset
  6. */
  7. class UnCloneableAsset
  8. {
  9. /**
  10. * Constructor - should not be called
  11. *
  12. * @throws BadMethodCallException
  13. */
  14. public function __construct()
  15. {
  16. throw new BadMethodCallException('Not supposed to be called!');
  17. }
  18. /**
  19. * Magic `__clone` - should not be invoked
  20. *
  21. * @throws BadMethodCallException
  22. */
  23. public function __clone()
  24. {
  25. throw new BadMethodCallException('Not supposed to be called!');
  26. }
  27. }