PHP Класс Horde_Vfs_Mongo, horde

Автор: Michael Slusarz ([email protected])
Наследование: extends Horde_Vfs_Base
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_files MongoGridFS The MongoDB GridFS object for the VFS data.
$_folders MongoGridCollection The MongoDB collection for the VFS folder data.

Открытые методы

Метод Описание
__construct ( array $params = [] ) Constructor.
createFolder ( $path, $name )
deleteFile ( $path, $name )
deleteFolder ( $path, $name, $recursive = false )
emptyFolder ( $path )
gc ( $path, $secs = 345600 )
getFolderSize ( $path = null )
isFolder ( $path, $name )
read ( $path, $name )
readByteRange ( $path, $name, &$offset, $length, &$remaining )
readStream ( string $path, string $name ) : resource Open a read-only stream to a file in the VFS.
rename ( $oldpath, $oldname, $newpath, $newname )
size ( $path, $name )
write ( $path, $name, $tmpFile, $autocreate = false )
writeData ( $path, $name, $data, $autocreate = false )

Защищенные методы

Метод Описание
_convertPath ( string $path ) : string Converts the path name from regular filesystem form to the internal format needed to access the file in the database.
_getFile ( $path, $name )
_isFolder ( $path )
_listFolder ( string $path, mixed $filter = null, boolean $dotfiles = true, boolean $dironly = false ) : array Returns an an unsorted file list of the specified directory.
_mdKey ( $key )
_write ( $type, $path, $name, $data, $autocreate )

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( array $params = [] )
$params array Additional parameters:
  - collection: (string) The collection name for the folders data.
  - gridfs: (string) The GridFS name.
  - mongo_db: [REQUIRED] (Horde_Mongo_Client) A MongoDB client object.

_convertPath() защищенный Метод

Namely, we will treat '/' as a base directory as this is pretty much the standard way to access base directories over most filesystems.
protected _convertPath ( string $path ) : string
$path string A VFS path.
Результат string The path with any surrouding slashes stripped off.

_getFile() защищенный Метод

protected _getFile ( $path, $name )

_isFolder() защищенный Метод

protected _isFolder ( $path )

_listFolder() защищенный Метод

Returns an an unsorted file list of the specified directory.
protected _listFolder ( string $path, mixed $filter = null, boolean $dotfiles = true, boolean $dironly = false ) : array
$path string The path of the directory.
$filter mixed String/hash to filter file/dirname on.
$dotfiles boolean Show dotfiles?
$dironly boolean Show only directories?
Результат array File list.

_mdKey() защищенный Метод

protected _mdKey ( $key )

_write() защищенный Метод

protected _write ( $type, $path, $name, $data, $autocreate )

createFolder() публичный Метод

public createFolder ( $path, $name )

deleteFile() публичный Метод

public deleteFile ( $path, $name )

deleteFolder() публичный Метод

public deleteFolder ( $path, $name, $recursive = false )

emptyFolder() публичный Метод

public emptyFolder ( $path )

gc() публичный Метод

public gc ( $path, $secs = 345600 )

getFolderSize() публичный Метод

public getFolderSize ( $path = null )

isFolder() публичный Метод

public isFolder ( $path, $name )

read() публичный Метод

public read ( $path, $name )

readByteRange() публичный Метод

public readByteRange ( $path, $name, &$offset, $length, &$remaining )

readStream() публичный Метод

Open a read-only stream to a file in the VFS.
public readStream ( string $path, string $name ) : resource
$path string The pathname to the file.
$name string The filename to retrieve.
Результат resource The stream.

rename() публичный Метод

public rename ( $oldpath, $oldname, $newpath, $newname )

size() публичный Метод

public size ( $path, $name )

write() публичный Метод

public write ( $path, $name, $tmpFile, $autocreate = false )

writeData() публичный Метод

public writeData ( $path, $name, $data, $autocreate = false )

Описание свойств

$_files защищенное свойство

The MongoDB GridFS object for the VFS data.
protected MongoGridFS $_files
Результат MongoGridFS

$_folders защищенное свойство

The MongoDB collection for the VFS folder data.
protected MongoGridCollection $_folders
Результат MongoGridCollection