1 | <?php |
||
26 | class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator |
||
27 | { |
||
28 | /** |
||
29 | * @var bool |
||
30 | */ |
||
31 | private $normalizeKey; |
||
32 | |||
33 | /** |
||
34 | * @var bool |
||
35 | */ |
||
36 | private $normalizeCurrent; |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | 12 | public function __construct($path, $flags = 0) |
|
42 | { |
||
43 | 12 | parent::__construct($path, $flags); |
|
44 | |||
45 | // Normalize slashes on Windows |
||
46 | 11 | $this->normalizeKey = '\\' === DIRECTORY_SEPARATOR && !($flags & self::KEY_AS_FILENAME); |
|
47 | 11 | $this->normalizeCurrent = '\\' === DIRECTORY_SEPARATOR && ($flags & self::CURRENT_AS_PATHNAME); |
|
48 | 11 | } |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 6 | public function getChildren() |
|
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | 9 | public function key() |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | 9 | public function current() |
|
85 | } |
||
86 |