[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/VFS/ -> musql.php (sommaire)

Permission for read access.

Poids: 482 lignes (18 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

VFS_musql:: (7 méthodes):
  writeData()
  deleteFile()
  rename()
  createFolder()
  deleteFolder()
  _listFolder()
  changePermissions()


Classe: VFS_musql  - X-Ref

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

Required values for $params:<pre>
'phptype'       The database type (ie. 'pgsql', 'mysql', etc.).</pre>

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

Required by some database implementations:<pre>
'hostspec'      The hostname of the database server.
'protocol'      The communication protocol ('tcp', 'unix', etc.).
'database'      The name of the database.
'username'      The username with which to connect to the database.
'password'      The password associated with 'username'.
'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.</pre>

Known Issues:
Delete is not recusive, so files and folders that used to be in a folder
that gets deleted live forever in the database, or re-appear when the folder
is recreated.
Rename has the same issue, so 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:
<code>
; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 0 ; zero to pass through

; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 0 ; zero to pass through
</code>

$Horde: framework/VFS/VFS/musql.php,v 1.30.4.16 2006/05/31 04:50:02 slusarz Exp $

Copyright 2002-2006 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.

writeData($path, $name, $data, $autocreate = false)   X-Ref
Store a file in the VFS from raw data.

param: string $path         The path to store the file in.
param: string $name         The filename to use.
param: string $data         The file data.
param: boolean $autocreate  Automatically create directories?
return: mixed  True on success or a PEAR_Error object on failure.

deleteFile($path, $name)   X-Ref
Delete a file from the VFS.

param: string $path  The path to store the file in.
param: string $name  The filename to use.
return: mixed  True on success or a PEAR_Error object on failure.

rename($oldpath, $oldname, $newpath, $newname)   X-Ref
Rename a file or folder in the VFS.

param: string $oldpath  The old path to the file.
param: string $oldname  The old filename.
param: string $newpath  The new path of the file.
param: string $newname  The new filename.
return: mixed  True on success or a PEAR_Error object on failure.

createFolder($path, $name)   X-Ref
Creates a folder on the VFS.

param: string $path  Holds the path of directory to create folder.
param: string $name  Holds the name of the new folder.
return: mixed  True on success or a PEAR_Error object on failure.

deleteFolder($path, $name, $recursive = false)   X-Ref
Delete a file from the VFS.

param: string $path        The path to delete the folder from.
param: string $name        The foldername to use.
param: boolean $recursive  Force a recursive delete?
return: mixed  True on success or a PEAR_Error object on failure.

_listFolder($path, $filter = null, $dotfiles = true,$dironly = false)   X-Ref
Return a list of the contents of a folder.

param: string $path       The path of the directory.
param: mixed $filter      String/hash to filter file/dirname on.
param: boolean $dotfiles  Show dotfiles?
param: boolean $dironly   Show only directories?
return: mixed  File list on success or false on failure.

changePermissions($path, $name, $permission)   X-Ref
Changes permissions for an Item on the VFS.

param: string $path  Holds the path of directory of the Item.
param: string $name  Holds the name of the Item.
return: mixed  True on success or a PEAR_Error object on failure.



Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7