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 }
if(!array_key_exists($filename, $text_files)) $file
static createInMemory()
Shorthand for generating a new in-memory-only filesystem.
Definition: Fly.php:166
static fromArray(array $files)
Shorthand for generating a new in-memory-only filesystem.
Definition: InMemory.php:22
$content
Set robots.txt action.
Definition: set_robots.php:6
foreach($resources as $id=> $href) if(!empty($resources_html)) $files
Definition: details.php:141
Namespace for generating in-memory filesystems.
Definition: InMemory.php:13
http free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition: MIT-LICENSE.txt:5