Elgg  Version 2.3
InMemory.php
Go to the documentation of this file.
1 <?php
3 
5 
13 final class InMemory {
14 
22  public static function fromArray(array $files) /*: Directory*/ {
23  $dir = Fly::createInMemory();
24 
25  foreach ($files as $file => $content) {
26  $dir->putContents($file, $content);
27  }
28 
29  return $dir;
30  }
31 }
$content
Set robots.txt action.
Definition: set_robots.php:6
static createInMemory()
Shorthand for generating a new in-memory-only filesystem.
Definition: Fly.php:166
Namespace for generating in-memory filesystems.
Definition: InMemory.php:13
static fromArray(array $files)
Shorthand for generating a new in-memory-only filesystem.
Definition: InMemory.php:22
foreach($resources as $id=> $href) if(!empty($resources_html)) $files
Definition: details.php:141
if(!array_key_exists($filename, $text_files)) $file