class-jsonserializable-object.php 327 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * Unit Tests: JsonSerializable_Object
  4. *
  5. * @package WordPress
  6. * @subpackage UnitTests
  7. * @since 5.3.0
  8. */
  9. class JsonSerializable_Object implements JsonSerializable {
  10. private $data;
  11. public function __construct( $data ) {
  12. $this->data = $data;
  13. }
  14. public function jsonSerialize() {
  15. return $this->data;
  16. }
  17. }