fix StreamWrapper not containing filesystems

This commit is contained in:
Toni Uebernickel
2012-10-30 15:07:34 +01:00
parent 0858fae9bc
commit eaaef8eda5
3 changed files with 30 additions and 9 deletions

View File

@@ -6,7 +6,7 @@ namespace Knp\Bundle\GaufretteBundle;
* Holds references to all declared filesystems
* and allows to access them through their name
*/
class FilesystemMap
class FilesystemMap implements \IteratorAggregate
{
/**
* Map of filesystems indexed by their name
@@ -26,9 +26,13 @@ class FilesystemMap
}
/**
* Retrieves a filesystem by its name.
*
* @param string $name name of a filesystem
*
* @return \Gaufrette\Filesystem
*
* @throw \InvalidArgumentException if the filesystem does not exist
* @return Filesystem
*/
public function get($name)
{
@@ -38,4 +42,9 @@ class FilesystemMap
return $this->map[$name];
}
public function getIterator()
{
return new \ArrayIterator($this->map);
}
}