Completed
Push — ezp_24520 ( 28972c )
by
unknown
28:46 queued 13:31
created

LocationList   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getIterator() 0 4 1
1
<?php
2
3
/**
4
 * File containing the eZ\Publish\API\Repository\Values\Content\LocationList class.
5
 *
6
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
7
 * @license For full copyright and license information view LICENSE file distributed with this source code.
8
 */
9
namespace eZ\Publish\API\Repository\Values\Content;
10
11
use ArrayIterator;
12
use eZ\Publish\API\Repository\Values\ValueObject;
13
use IteratorAggregate;
14
use Traversable;
15
16
/**
17
 * This class represents a queried location list holding a totalCount and a partial list of locations
18
 * (by offset/limit parameters and permission filters).
19
 *
20
 * @property-read int $totalCount - the total count of found locations (filtered by permissions)
21
 * @property-read \eZ\Publish\API\Repository\Values\Content\Location[] $locations - the partial list of locations controlled by offset/limit
22
 **/
23
class LocationList extends ValueObject implements IteratorAggregate
24
{
25
    /**
26
     * the total count of found locations (filtered by permissions).
27
     *
28
     * @var int
29
     */
30
    protected $totalCount;
31
32
    /**
33
     * the partial list of locations controlled by offset/limit.
34
     *
35
     * @var \eZ\Publish\API\Repository\Values\Content\Location[]
36
     */
37
    protected $locations;
38
39
    public function getIterator(): Traversable
40
    {
41
        return new ArrayIterator($this->locations);
42
    }
43
}
44