Completed
Branch BUG/reg-status-change-recursio... (2db0c9)
by
unknown
20:03 queued 10:32
created

BlockAssetManagerCollection   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A addAssets() 0 9 2
A enqueueAssets() 0 9 2
1
<?php
2
3
namespace EventEspresso\core\services\assets;
4
5
use EventEspresso\core\exceptions\InvalidInterfaceException;
6
use EventEspresso\core\services\collections\Collection;
7
8
/**
9
 * Class BlockAssetManagerCollection
10
 * a Collection of BlockAssetManager objects
11
 *
12
 * @package EventEspresso\core\services\assets
13
 * @author  Brent Christensen
14
 * @since   $VID:$
15
 */
16
class BlockAssetManagerCollection extends Collection
17
{
18
19
    /**
20
     * Collection constructor
21
     *
22
     * @throws InvalidInterfaceException
23
     */
24
    public function __construct()
25
    {
26
        parent::__construct('EventEspresso\core\services\assets\BlockAssetManager');
27
    }
28
29
30
    /**
31
     * @return  void
32
     */
33
    public function addAssets()
34
    {
35
        $this->rewind();
36
        while ($this->valid()) {
37
            $this->current()->addAssets();
38
            $this->next();
39
        }
40
        $this->rewind();
41
    }
42
43
44
    /**
45
     * @return  void
46
     */
47
    public function enqueueAssets()
48
    {
49
        $this->rewind();
50
        while ($this->valid()) {
51
            $this->current()->enqueueAssets();
52
            $this->next();
53
        }
54
        $this->rewind();
55
    }
56
}
57