SerializableArrayObjectAsset.php 841 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace DoctrineTest\InstantiatorTestAsset;
  3. use ArrayObject;
  4. use BadMethodCallException;
  5. use Serializable;
  6. /**
  7. * Serializable test asset that also extends an internal class
  8. */
  9. class SerializableArrayObjectAsset extends ArrayObject implements Serializable
  10. {
  11. /**
  12. * Constructor - should not be called
  13. *
  14. * @throws BadMethodCallException
  15. */
  16. public function __construct()
  17. {
  18. throw new BadMethodCallException('Not supposed to be called!');
  19. }
  20. /**
  21. * {@inheritDoc}
  22. */
  23. public function serialize()
  24. {
  25. return '';
  26. }
  27. /**
  28. * {@inheritDoc}
  29. *
  30. * Should not be called
  31. *
  32. * @throws BadMethodCallException
  33. */
  34. public function unserialize($serialized)
  35. {
  36. throw new BadMethodCallException('Not supposed to be called!');
  37. }
  38. }