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