Ejemplo n.º 1
0
 /**
  * Sets the current handler and path.
  */
 protected function setCurrent()
 {
     if (!isset($this->contents[$this->position])) {
         $this->current = null;
         $this->key = null;
         return;
     }
     $this->current = $this->contents[$this->position];
     $path = $this->current->getFullPath();
     if ($this->mode & static::KEY_FOR_GLOB) {
         // Glob code requires absolute paths, so prefix path
         // with leading slash, but not before mount point
         if (strpos($path, '://') > 0) {
             $path = str_replace('://', ':///', $path);
         } else {
             $path = '/' . ltrim($path, '/');
         }
     }
     $this->key = $path;
 }