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