normalize($components); if ($parsedComponents->count() > 0 && $parsedComponents[0] === '..') { if ($strict) { throw new \InvalidArgumentException('Path went beyond root'); } do { $parsedComponents->shift(); } while ($parsedComponents[0] === '..'); } $this->prefix = $prefix; $this->components = $parsedComponents; } }