Drupal investigation

DumperInterface.php 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\VarDumper\Cloner;
  11. /**
  12. * DumperInterface used by Data objects.
  13. *
  14. * @author Nicolas Grekas <p@tchwork.com>
  15. */
  16. interface DumperInterface
  17. {
  18. /**
  19. * Dumps a scalar value.
  20. *
  21. * @param Cursor $cursor The Cursor position in the dump
  22. * @param string $type The PHP type of the value being dumped
  23. * @param scalar $value The scalar value being dumped
  24. */
  25. public function dumpScalar(Cursor $cursor, $type, $value);
  26. /**
  27. * Dumps a string.
  28. *
  29. * @param Cursor $cursor The Cursor position in the dump
  30. * @param string $str The string being dumped
  31. * @param bool $bin Whether $str is UTF-8 or binary encoded
  32. * @param int $cut The number of characters $str has been cut by
  33. */
  34. public function dumpString(Cursor $cursor, $str, $bin, $cut);
  35. /**
  36. * Dumps while entering an hash.
  37. *
  38. * @param Cursor $cursor The Cursor position in the dump
  39. * @param int $type A Cursor::HASH_* const for the type of hash
  40. * @param string $class The object class, resource type or array count
  41. * @param bool $hasChild When the dump of the hash has child item
  42. */
  43. public function enterHash(Cursor $cursor, $type, $class, $hasChild);
  44. /**
  45. * Dumps while leaving an hash.
  46. *
  47. * @param Cursor $cursor The Cursor position in the dump
  48. * @param int $type A Cursor::HASH_* const for the type of hash
  49. * @param string $class The object class, resource type or array count
  50. * @param bool $hasChild When the dump of the hash has child item
  51. * @param int $cut The number of items the hash has been cut by
  52. */
  53. public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut);
  54. }