Elgg  Version 4.3
InMemory.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
14 final class InMemory {
15 
23  public static function fromArray(array $files) /*: Directory*/ {
24  $dir = Fly::createInMemory();
25 
26  foreach ($files as $file => $content) {
27  $dir->putContents($file, $content);
28  }
29 
30  return $dir;
31  }
32 }
static createInMemory()
Shorthand for generating a new in-memory-only filesystem.
Definition: Fly.php:189
static fromArray(array $files)
Shorthand for generating a new in-memory-only filesystem.
Definition: InMemory.php:23
$content
Set robots.txt action.
Definition: set_robots.php:6
Namespace for generating in-memory filesystems.
Definition: InMemory.php:14