JsonSerializable.php 446 B

123456789101112131415161718
  1. <?php
  2. namespace Pingpp;
  3. // JsonSerializable only exists in PHP 5.4+. Stub if out if it doesn't exist
  4. if (interface_exists('\JsonSerializable', false)) {
  5. interface JsonSerializable extends \JsonSerializable
  6. {
  7. }
  8. } else {
  9. // PSR2 wants each interface to have its own file.
  10. // @codingStandardsIgnoreStart
  11. interface JsonSerializable
  12. {
  13. // @codingStandardsIgnoreEnd
  14. public function jsonSerialize();
  15. }
  16. }