From 22229b5349e2ad524aca66798a7b7e9aa82efe28 Mon Sep 17 00:00:00 2001 From: JHGitty Date: Sun, 31 Jan 2016 00:12:35 +0100 Subject: [PATCH] Add has($name) function to FilesystemMap --- FilesystemMap.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/FilesystemMap.php b/FilesystemMap.php index 8abd2b2..b4313ac 100644 --- a/FilesystemMap.php +++ b/FilesystemMap.php @@ -43,6 +43,16 @@ class FilesystemMap implements \IteratorAggregate 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);