/functions/file_prefs.php

Description

file_prefs.php

This contains functions for manipulating user preferences in files

Functions
cachePrefValues (line 26)

Check the preferences into the session cache.

  • since: 1.1.3
void cachePrefValues (string $data_dir, string $username)
  • string $data_dir
  • string $username
checkForPrefs (line 226)

Check for a preferences file. If one can not be found, create it.

void checkForPrefs (string $data_dir, string $username, [string $filename = ''])
  • string $data_dir: data directory
  • string $username: user name
  • string $filename: (since 1.2.0) preference file name. (OPTIONAL; default is an empty string, in which case the file name is automatically detected)
getPref (line 109)

Return the value for the desired preference.

mixed getPref (string $data_dir, string $username, string $pref_name, [string $default = ''])
  • string $data_dir: data directory
  • string $username: user name
  • string $pref_name: preference name
  • string $default: (since 1.2.0) default preference value
getSig (line 323)

Get the signature.

  • return: signature
string getSig (string $data_dir, string $username, integer $number)
  • string $data_dir: data directory
  • string $username: user name
  • integer $number: (since 1.2.5) identity number
removePref (line 176)

Remove a preference for the current user.

void removePref (string $data_dir, string $username, string $pref_name)
  • string $data_dir: data directory
  • string $username: user name
  • string $pref_name: preference name
savePrefValues (line 139)

Save the preferences for this user.

  • since: 1.1.3
void savePrefValues (string $data_dir, string $username)
  • string $data_dir: data directory
  • string $username: user name
setPref (line 198)

Set the desired preference setting ($pref_name) to whatever is in $value.

void setPref (string $data_dir, string $username, string $pref_name, mixed $value)
  • string $data_dir: data directory
  • string $username: user name
  • string $pref_name: preference name
  • mixed $value: preference value
setSig (line 287)

Write the User Signature.

void setSig (string $data_dir, string $username, integer $number, string $value)
  • string $data_dir: data directory
  • string $username: user name
  • integer $number: (since 1.2.5) identity number. (before 1.2.5., this parameter was used for the signature value)
  • string $value: (since 1.2.5) signature value

Documentation generated on Tue, 29 Jul 2014 04:17:54 +0200 by phpDocumentor 1.4.3