Completed
Pull Request — master (#46)
by Michael
03:12
created

BasicManager::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace Michaels\Manager;
3
4
use Interop\Container\ContainerInterface;
5
use Michaels\Manager\Contracts\ManagesItemsInterface;
6
use Michaels\Manager\Traits\ManagesItemsTrait;
7
8
/**
9
 * Manages deeply nested, complex data.
10
 *
11
 * A basic manager class with no pizazz. Simply manages complex data.
12
 * NOTE: this is not arrayable.
13
 *
14
 * @package Michaels\Manager
15
 */
16
class BasicManager implements
17
    ManagesItemsInterface,
18
    ContainerInterface
19
{
20
    use ManagesItemsTrait;
21
22
    /**
23
     * The items stored in the manager
24
     * @var array $items Items governed by manager
25
     */
26
    protected $items;
27
28
    /**
29
     * Build a new manager instance
30
     * @param array $items
31
     */
32
    public function __construct($items = [])
33
    {
34
        $this->initManager($items);
35
    }
36
}
37