ISerializer::serializeIdentifiers()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
ccs 0
cts 0
cp 0
c 0
b 0
f 0
1
<?php
2
/**
3
 * ISerializer.php
4
 *
5
 * @copyright      More in license.md
6
 * @license        https://www.ipublikuj.eu
7
 * @author         Adam Kadlec <[email protected]>
8
 * @package        iPublikuj:JsonAPIClient!
9
 * @subpackage     Encoders
10
 * @since          1.0.0
11
 *
12
 * @date           05.05.18
13
 */
14
15
declare(strict_types = 1);
16
17
namespace IPub\JsonAPIClient\Encoders;
18
19
use Iterator;
20
use Neomerx\JsonApi\Contracts\Document\ErrorInterface;
21
use Neomerx\JsonApi\Contracts\Encoder\EncoderInterface;
22
use Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface;
23
use Neomerx\JsonApi\Exceptions\ErrorCollection;
24
25
/**
26
 * Serializer interface
27
 *
28
 * @package        iPublikuj:JsonAPIClient!
29
 * @subpackage     Encoders
30
 *
31
 * @author         Adam Kadlec <[email protected]>
32
 */
33 1
interface ISerializer extends EncoderInterface
34
{
35
	/**
36
	 * @param array|Iterator|NULL $data
37
	 * @param EncodingParametersInterface|NULL $parameters
38
	 *
39
	 * @return array
40
	 */
41
	public function serializeData($data, EncodingParametersInterface $parameters = NULL);
42
43
	/**
44
	 * @param array|Iterator|NULL $data
45
	 * @param EncodingParametersInterface|NULL $parameters
46
	 *
47
	 * @return array
48
	 */
49
	public function serializeIdentifiers($data, EncodingParametersInterface $parameters = NULL);
50
51
	/**
52
	 * @param ErrorInterface $error
53
	 *
54
	 * @return array
55
	 */
56
	public function serializeError(ErrorInterface $error);
57
58
	/**
59
	 * @param ErrorInterface[]|ErrorCollection $errors
60
	 *
61
	 * @return array
62
	 */
63
	public function serializeErrors($errors);
64
65
	/**
66
	 * @param array $meta
67
	 *
68
	 * @return array
69
	 */
70
	public function serializeMeta($meta);
71
}
72