mirror of
https://github.com/getformwork/formwork.git
synced 2025-02-24 01:32:25 +01:00
Add Files::get()
method
This commit is contained in:
parent
854e058500
commit
333a9c2530
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user