1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer;
6
7/**
8 * Interface for visitors.
9 *
10 * This contains the minimal set of values that must be supported for any
11 * output format.
12 *
13 * @internal
14 *
15 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
16 * @author Asmir Mustafic <goetas@gmail.com>
17 */
18interface VisitorInterface
19{
20    /**
21     * Allows visitors to convert the input data to a different representation
22     * before the actual serialization/deserialization process starts.
23     *
24     * @param mixed $data
25     *
26     * @return mixed
27     */
28    public function prepare($data);
29
30    /**
31     * Called before serialization/deserialization starts.
32     */
33    public function setNavigator(GraphNavigatorInterface $navigator): void;
34
35    /**
36     * Get the result of the serialization/deserialization process.
37     *
38     * @param mixed $data
39     *
40     * @return mixed
41     */
42    public function getResult($data);
43}
44