Add Files::get() method

This commit is contained in:
Giuseppe Criscione 2019-03-18 19:44:45 +01:00
parent 854e058500
commit 333a9c2530

View File

@ -39,6 +39,20 @@ class Files extends Collection
return isset($this->items[$file]);
}
/**
* Get a file from the collection
*
* @param string $file
*
* @return File|null
*/
public function get($file)
{
if ($this->has($file)) {
return $this->items[$file];
}
}
/**
* Get files path
*