[ Index ]
 

Code source de Horde 3.1.3

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

title

Body

[fermer]

/lib/Horde/Prefs/ -> sql.php (sommaire)

(pas de description)

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

Définit 1 class

Prefs_sql:: (10 méthodes):
  Prefs_sql()
  getCharset()
  retrieve()
  store()
  cleanup()
  clear()
  convertFromDriver()
  convertToDriver()
  _connect()
  _disconnect()


Classe: Prefs_sql  - X-Ref

Preferences storage implementation for PHP's PEAR database
abstraction layer.

Required parameters:<pre>
'phptype'   The database type (ie. 'pgsql', 'mysql', etc.).
'charset'   The database's internal charset.</pre>

Optional parameters:<pre>
'table'     The name of the preferences table in 'database'.
DEFAULT: 'horde_prefs'</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.
'port'      The port on which to connect to the database.
'tty'       The TTY on which to connect to the database.</pre>

The table structure for the Prefs system is in
scripts/sql/horde_prefs.sql.

$Horde: framework/Prefs/Prefs/sql.php,v 1.91.10.20 2006/04/10 15:58:14 chuck Exp $

Copyright 1999-2006 Jon Parise <jon@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.

Prefs_sql($user, $password = '', $scope = '',$params = array()   X-Ref
Constructs a new SQL preferences object.

param: string $user      The user who owns these preferences.
param: string $password  The password associated with $user. (Unused)
param: string $scope     The current preferences scope.
param: array $params     A hash containing connection parameters.
param: boolean $caching  Should caching be used?

getCharset()   X-Ref
Returns the charset used by the concrete preference backend.

return: string  The preference backend's charset.

retrieve($prefs = array()   X-Ref
Retrieves the requested set of preferences from the user's database
entry.

param: array $prefs  An array listing the preferences to retrieve. If
return: mixed  True on success or a PEAR_Error object on failure.

store()   X-Ref
Stores preferences to SQL server.

return: mixed  True on success or a PEAR_Error object on failure.

cleanup($all = false)   X-Ref
Perform cleanup operations.

param: boolean $all  Cleanup all Horde preferences.

clear()   X-Ref
Clears all preferences from the backend.


convertFromDriver($value, $charset)   X-Ref
Converts a value from the driver's charset to the specified charset.

param: mixed $value     A value to convert.
param: string $charset  The charset to convert to.
return: mixed  The converted value.

convertToDriver($value, $charset)   X-Ref
Converts a value from the specified charset to the driver's charset.

param: mixed $value  A value to convert.
param: string $charset  The charset to convert from.
return: mixed  The converted value.

_connect()   X-Ref
Attempts to open a persistent connection to the SQL server.

return: mixed  True on success or a PEAR_Error object on failure.

_disconnect()   X-Ref
Disconnect from the SQL server and clean up the connection.

return: boolean  True on success, false on failure.



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