Свойство | Тип | Описание | |
---|---|---|---|
$content | Content variable is lazy. It will not be read from filesystem until it's requested first time. | ||
$filesystem | |||
$key | |||
$metadata | metadata in associative array. Only for adapters that support metadata | ||
$mtime | File date modified. | ||
$name | Human readable filename (usually the end of the key). | ||
$size | File size in bytes. |
Метод | Описание | |
---|---|---|
__construct ( string $key, gaufrette\Filesystem $filesystem ) | ||
createStream ( ) : gaufrette\Stream | Creates a new file stream instance of the file. | |
delete ( array $metadata = [] ) : boolean | Deletes the file from the filesystem. | |
exists ( ) : boolean | Indicates whether the file exists in the filesystem. | |
getContent ( array $metadata = [] ) : string | Returns the content. | |
getKey ( ) : string | Returns the key. | |
getMtime ( ) : integer | Returns the file modified time. | |
getName ( ) : string | ||
getSize ( ) : integer | ||
setContent ( string $content, array $metadata = [] ) : integer | Sets the content. | |
setName ( string $name ) | ||
setSize ( integer $size ) |
Метод | Описание | |
---|---|---|
setMetadata ( array $metadata ) : boolean | Sets the metadata array to be stored in adapters that can support it. |
Метод | Описание | |
---|---|---|
supportsMetadata ( ) : boolean |
public __construct ( string $key, gaufrette\Filesystem $filesystem ) | ||
$key | string | |
$filesystem | gaufrette\Filesystem |
public createStream ( ) : gaufrette\Stream | ||
Результат | gaufrette\Stream |
public getContent ( array $metadata = [] ) : string | ||
$metadata | array | optional metadata which should be set when read |
Результат | string |
protected setMetadata ( array $metadata ) : boolean | ||
$metadata | array | |
Результат | boolean |
protected $content |
protected $metadata |