RecursiveIteratorIterator::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * KNUT7 K7F (https://marciozebedeu.com/)
5
 * KNUT7 K7F (tm) : Rapid Development Framework (https://marciozebedeu.com/)
6
 *
7
 * Licensed under The MIT License
8
 * For full copyright and license information, please see the LICENSE.txt
9
 * Redistributions of files must retain the above copyright notice.
10
 *
11
 * @link      https://github.com/knut7/framework/ for the canonical source repository
12
 * @copyright (c) 2015.  KNUT7  Software Technologies AO Inc. (https://marciozebedeu.com/)
13
 * @license   https://marciozebedeu.com/license/new-bsd New BSD License
14
 * @author    Marcio Zebedeu - [email protected]
15
 * @version   1.0.2
16
 */
17
18
namespace Ballybran\Core\Collections\Collection;
19
20
/**
21
 * Description of RecursiveIteratorIterator
22
 *
23
 * @author artphotografie
24
 */
25
class RecursiveIteratorIterator
26
{
27
28
29
    //put your code here
30
31
    /**
32
     * @var array
33
     */
34
    private $elements;
35
36
    public function __construct(array $elements)
37
    {
38
39
        $this->elements = $elements;
40
    }
41
42
    public function recursiveIteratorIterator()
43
    {
44
45
        $obj = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($this->elements));
46
47
        return $obj;
48
    }
49
50
}
51