VFS
[ class tree: VFS ] [ index: VFS ] [ all elements ]

Class: VFS_musql

Source Location: /VFS-0.0.5/VFS/musql.php

Class Overview

VFS
   |
   --VFS_sql
      |
      --VFS_musql

Multi User VFS implementation for PHP's PEAR database abstraction layer.


Author(s):

Methods


Inherited Variables

Inherited Methods

Class: VFS_sql

VFS_sql::createFolder()
Creates a folder on the VFS.
VFS_sql::deleteFile()
Delete a file from the VFS.
VFS_sql::deleteFolder()
Delete a folder from the VFS.
VFS_sql::listFolders()
Returns a sorted list of folders in specified directory.
VFS_sql::read()
Retrieve a file from the VFS.
VFS_sql::rename()
Rename a file or folder in the VFS.
VFS_sql::write()
Stores a file in the VFS.
VFS_sql::writeData()
Store a file in the VFS from raw data.
VFS_sql::_listFolder()
Return a list of the contents of a folder.

Class: VFS

VFS::VFS()
Constructor.
VFS::autocreatePath()
Automatically creates any necessary parent directories in the specified $path.
VFS::changePermissions()
Changes permissions for an item on the VFS.
VFS::checkCredentials()
Checks the credentials that we have by calling _connect(), to see if there is a valid login.
VFS::copy()
Copies a file through the backend.
VFS::createFolder()
Creates a folder in the VFS.
VFS::deleteFile()
Deletes a file from the VFS.
VFS::deleteFolder()
Deletes a folder from the VFS.
VFS::emptyFolder()
Removes recursively all files and subfolders from the given folder.
VFS::exists()
Returns if a given file or folder exists in a folder.
VFS::factory()
Attempts to return a concrete VFS instance based on $driver.
VFS::getCurrentDirectory()
Returns the current working directory of the VFS backend.
VFS::getModifiablePermissions()
Returns an array specifying what permissions are changeable for this VFS implementation.
VFS::getParam()
Returns configuration parameters.
VFS::getRequiredCredentials()
Returns the list of additional credentials required, if any.
VFS::isFolder()
Checks if a given item is a folder.
VFS::listFolder()
Returns a file list of the directory passed in.
VFS::listFolders()
Returns a sorted list of folders in the specified directory.
VFS::log()
Logs a message if a PEAR Log object is available, and the message's priority is lower than or equal to the configured log level.
VFS::move()
Moves a file through the backend.
VFS::read()
Retrieves a file from the VFS.
VFS::rename()
Renames a file in the VFS.
VFS::setLogger()
Sets the PEAR Log object used to log informational or error messages.
VFS::setParams()
Sets configuration parameters.
VFS::singleton()
Attempts to return a reference to a concrete VFS instance based on $driver. It will only create a new instance if no VFS instance with the same parameters currently exists.
VFS::strlen()
Returns the character (not byte) length of a string.
VFS::strtolower()
Converts a string to all lowercase characters ignoring the current locale.
VFS::write()
Stores a file in the VFS.
VFS::writeData()
Stores a file in the VFS from raw data.
VFS::_listFolder()
Returns an an unsorted file list of the specified directory.

Class Details

[line 68]
Multi User VFS implementation for PHP's PEAR database abstraction layer.

 Required values for $params:
      'phptype'       The database type (ie. 'pgsql', 'mysql, etc.).
      'hostspec'      The hostname of the database server.
      'protocol'      The communication protocol ('tcp', 'unix', etc.).
      'username'      The username with which to connect to the database.
      'password'      The password associated with 'username'.
      'database'      The name of the database.

 Optional values:
      'table'         The name of the vfs table in 'database'. Defaults to
                      'horde_muvfs'.

 Required by some database implementations:
      'options'       Additional options to pass to the database.
      'tty'           The TTY on which to connect to the database.
      'port'          The port on which to connect to the database.

Known Issues: Delete is not recusive, so file and folders that used to be in a folder that gets deleted life forever in the database, or re-appear when the folder is recreated. Rename has the same issue, if files are lost if a folder is renamed.

The table structure for the VFS can be found in data/muvfs.sql.

Database specific notes:

MSSQL:

  • The vfs_data field must be of type IMAGE.
  • You need the following php.ini settings:
    1.     ; Valid range 0 - 2147483647. Default = 4096.
    2.     mssql.textlimit = 0 ; zero to pass through
    3.  
    4.     ; Valid range 0 - 2147483647. Default = 4096.
    5.     mssql.textsize = 0 ; zero to pass through
$Horde: framework/VFS/VFS/musql.php,v 1.34 2005/04/07 13:24:23 jan Exp $

Copyright 2002-2005 Chuck Hagenbuch <chuck@horde.org>

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.



[ Top ]


Method Detail

changePermissions   [line 445]

mixed changePermissions( string $path, string $name, $permission)

Changes permissions for an Item on the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS::changePermissions() (Changes permissions for an item on the VFS.)

Parameters:

string   $path   —  Holds the path of directory of the Item.
string   $name   —  Holds the name of the Item.
   $permission   — 

[ Top ]

createFolder   [line 246]

mixed createFolder( string $path, string $name)

Creates a folder on the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS_sql::createFolder() (Creates a folder on the VFS.)

Parameters:

string   $path   —  Holds the path of directory to create folder.
string   $name   —  Holds the name of the new folder.

[ Top ]

deleteFile   [line 156]

mixed deleteFile( string $path, string $name)

Delete a file from the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS_sql::deleteFile() (Delete a file from the VFS.)

Parameters:

string   $path   —  The path to store the file in.
string   $name   —  The filename to use.

[ Top ]

deleteFolder   [line 301]

mixed deleteFolder( string $path, string $name, [optional $recursive = false])

Delete a file from the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS_sql::deleteFolder() (Delete a folder from the VFS.)

Parameters:

string   $path   —  The path to delete the folder from.
string   $name   —  The foldername to use.
optional   $recursive   —  boolean $recursive Force a recursive delete?

[ Top ]

rename   [line 204]

mixed rename( string $oldpath, string $oldname, string $newpath, string $newname)

Rename a file or folder in the VFS.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS_sql::rename() (Rename a file or folder in the VFS.)

Parameters:

string   $oldpath   —  The old path to the file.
string   $oldname   —  The old filename.
string   $newpath   —  The new path of the file.
string   $newname   —  The new filename.

[ Top ]

writeData   [line 93]

mixed writeData( string $path, string $name, string $data, [optional $autocreate = false])

Store a file in the VFS from raw data.
  • Return: True on success or a PEAR_Error object on failure.
  • Access: public

Overrides VFS_sql::writeData() (Store a file in the VFS from raw data.)

Parameters:

string   $path   —  The path to store the file in.
string   $name   —  The filename to use.
string   $data   —  The file data.
optional   $autocreate   —  boolean $autocreate Automatically create directories?

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:31:25 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.