Elgg  Version 3.0
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 }
if(!array_key_exists($filename, $text_files)) $file
static createInMemory()
Shorthand for generating a new in-memory-only filesystem.
Definition: Fly.php:184
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
foreach($resources as $id=> $href) if(!empty($resources_html)) $files
Definition: details.php:142
Namespace for generating in-memory filesystems.
Definition: InMemory.php:14