YANA 4 PHP Framework
Docs For Class VDrive
virtual Drive
Class to abstract from real filesystems by mapping filenames to aliases (mountpoints). Mountpoints my be mounted and unmounted at runtime. When reading a mountpoint, a corresponding file wrapper will be returned to work on the file.
Using virtual drives will clean your source from hard-coded file- and directory names, as well as doing all the job of creating and initializing the file wrappers for you.
Located in /includes/class_vdrive.php
SerializeableObject | --InputStream | --SecureInputStream | --VDrive
Class | Description |
---|---|
Registry | Registry |
constructor
creates a new virtual drive instance
Name | Type | Description |
---|---|---|
$filename | string | |
$OPTIONS | array | |
$baseDir | string | |
$mode | int |
add another drive to repository
Loads the drive identified by $filename within the directory $baseDir and adds a new mountpoint containing the drive's data to the repository.
Name | Type | Description |
---|---|---|
$filename | string | |
$mode | int |
get a mountpoint
Returns the mountpoint specified by $key or bool(false) if no such mountpoint exists, or the mountpoint was unable to return any contents.
Name | Type | Description |
---|---|---|
$key | string | name of the drive to mount |
mount an unmounted virtual drive
Mount the mountpoint identified by $key and copies the contents (if any) to the repository.
This function returns bool(true) on success, or bool(false) on error.
Name | Type | Description |
---|---|---|
$key | string | name of the drive to mount |
read the virtual drive
This (re-)loads the virtual drive and (re-)initializes it's contents.
If the file does not exist or is not readable, the functions returns bool(false), else bool(true) is returned.
get string represenation of a virtual drive
This returns a human readable overview of the currently loaded virtual drive and it's contents.
You might want to use this for debugging purposes.
Inherited From SecureInputStream
SecureInputStream::checksum()
SecureInputStream::failSafeRead()
SecureInputStream::get()
SecureInputStream::isEmpty()
SecureInputStream::read()
SecureInputStream::reset()
SecureInputStream::toString()
Inherited From InputStream
InputStream::InputStream()
InputStream::exists()
InputStream::get()
InputStream::getFilename()
InputStream::isEmpty()
InputStream::read()
InputStream::resetStats()
InputStream::toString()
Inherited From SerializeableObject
SerializeableObject::serialize()
SerializeableObject::toString()
Documentation generated on Sat, 16 Sep 2006 17:06:12 +0200 by phpDocumentor 1.3.0RC4