PHP Class Gaufrette\Adapter\InMemory

Stores some files in memory for test purposes
Author: Antoine Hérault ([email protected])
Inheritance: implements Gaufrette\Adapter
Mostrar archivo Open project: knplabs/gaufrette Class Usage Examples

Protected Properties

Property Type Description
$files

Public Methods

Method Description
__construct ( array $files = [] )
delete ( $key )
exists ( $key )
isDirectory ( $path )
keys ( )
mimeType ( $key )
mtime ( $key )
read ( $key )
rename ( $sourceKey, $targetKey )
setFile ( string $key, string $content = null, integer $mtime = null ) Defines a file.
setFiles ( array $files ) Defines the files.
write ( $key, $content, array $metadata = null )

Method Details

__construct() public method

public __construct ( array $files = [] )
$files array An array of files

delete() public method

public delete ( $key )

exists() public method

public exists ( $key )

isDirectory() public method

public isDirectory ( $path )

keys() public method

public keys ( )

mimeType() public method

public mimeType ( $key )

mtime() public method

public mtime ( $key )

read() public method

public read ( $key )

rename() public method

public rename ( $sourceKey, $targetKey )

setFile() public method

Defines a file.
public setFile ( string $key, string $content = null, integer $mtime = null )
$key string The key
$content string The content
$mtime integer The last modified time (automatically set to now if NULL)

setFiles() public method

Defines the files.
public setFiles ( array $files )
$files array An array of files

write() public method

public write ( $key, $content, array $metadata = null )
$metadata array

Property Details

$files protected_oe property

protected $files