map = $map; } /** * Retrieves a filesystem by its name. * * @param string $name name of a filesystem * * @return \Gaufrette\Filesystem * * @throw \InvalidArgumentException if the filesystem does not exist */ public function get($name) { if (!isset($this->map[$name])) { throw new \InvalidArgumentException(sprintf('No filesystem register for name "%s"', $name)); } return $this->map[$name]; } /** * @param string $name name of a filesystem * * @return bool */ public function has($name) { return isset($this->map[$name]); } public function getIterator() { return new \ArrayIterator($this->map); } }