1 | <?php declare(strict_types=1); |
||
8 | class Result extends Set |
||
9 | { |
||
10 | protected $totalCount = 0; |
||
11 | |||
12 | /** |
||
13 | * Create a new Result. |
||
14 | */ |
||
15 | public function __construct(array $members = []) |
||
20 | |||
21 | /** |
||
22 | * Ignores the argument to ensure that a Result is always closed. |
||
23 | */ |
||
24 | public function setClosed(bool $closed = true) |
||
28 | |||
29 | /** |
||
30 | * Get the total number of members including other pages. May be NULL. |
||
31 | */ |
||
32 | public function getTotalCount() |
||
36 | |||
37 | /** |
||
38 | * Set the total number of members including other pages. May be NULL for unknown. |
||
39 | */ |
||
40 | public function setTotalCount(int $count) |
||
44 | |||
45 | /** |
||
46 | * Remove total count. |
||
47 | */ |
||
48 | public function unsetTotalCount() |
||
52 | |||
53 | /** |
||
54 | * Append a Resource and possibly increase totalCount if needed. |
||
55 | */ |
||
56 | public function append($resource) |
||
63 | |||
64 | /** |
||
65 | * Serialize with type and context fields for each member. |
||
66 | */ |
||
67 | public function jsonLDSerialize(string $context = self::DEFAULT_CONTEXT, bool $types = NULL) |
||
73 | } |
||
74 |