@@ 16-32 (lines=17) @@ | ||
13 | */ |
|
14 | private $container; |
|
15 | ||
16 | protected function init($it = null) |
|
17 | { |
|
18 | if (null !== $it) { |
|
19 | $this->validateTraversable($it); |
|
20 | ||
21 | $coll = []; |
|
22 | foreach ($it as $key => $value) { |
|
23 | if (is_array($value)) { |
|
24 | $value = new static($value); |
|
25 | } |
|
26 | $coll[$key] = $value; |
|
27 | } |
|
28 | $this->container = $coll; |
|
29 | } else { |
|
30 | $this->container = []; |
|
31 | } |
|
32 | } |
|
33 | ||
34 | /** |
|
35 | * {@inheritdoc} |
@@ 16-32 (lines=17) @@ | ||
13 | */ |
|
14 | private $container; |
|
15 | ||
16 | protected function init($it = null) |
|
17 | { |
|
18 | if (null !== $it) { |
|
19 | $this->validateTraversable($it); |
|
20 | ||
21 | $coll = []; |
|
22 | foreach ($it as $value) { |
|
23 | if (is_array($value)) { |
|
24 | $value = new static($value); |
|
25 | } |
|
26 | $coll[] = $value; |
|
27 | } |
|
28 | $this->container = $coll; |
|
29 | } else { |
|
30 | $this->container = []; |
|
31 | } |
|
32 | } |
|
33 | ||
34 | /** |
|
35 | * {@inheritdoc} |
@@ 16-32 (lines=17) @@ | ||
13 | */ |
|
14 | private $container; |
|
15 | ||
16 | protected function init($it = null) |
|
17 | { |
|
18 | if (null !== $it) { |
|
19 | $this->validateTraversable($it); |
|
20 | ||
21 | $coll = []; |
|
22 | foreach ($it as $value) { |
|
23 | if (is_array($value)) { |
|
24 | $value = new static($value); |
|
25 | } |
|
26 | $coll[] = $value; |
|
27 | } |
|
28 | $this->container = $coll; |
|
29 | } else { |
|
30 | $this->container = []; |
|
31 | } |
|
32 | } |
|
33 | ||
34 | /** |
|
35 | * {@inheritdoc} |