PHP 클래스 Horde_Vfs_Mongo, horde

저자: Michael Slusarz ([email protected])
상속: extends Horde_Vfs_Base
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_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