Class vB_Datastore

Description

Class for fetching and initializing the vBulletin datastore from the database

  • version: $Revision: 35065 $
  • date: $Date: 2010-01-21 14:01:23 -0600 (Thu, 21 Jan 2010) $

Located in /includes/class_core.php (line 1365)


	
			
Direct descendents
Class Description
 class vB_Datastore_eAccelerator Class for fetching and initializing the vBulletin datastore from eAccelerator
 class vB_Datastore_Memcached Class for fetching and initializing the vBulletin datastore from a Memcache Server
 class vB_Datastore_APC Class for fetching and initializing the vBulletin datastore from APC
 class vB_Datastore_XCache Class for fetching and initializing the vBulletin datastore from XCache
 class vB_Datastore_Filecache Class for fetching and initializing the vBulletin datastore from files
Variable Summary
Method Summary
 vB_Datastore vB_Datastore (vB_Registry &$registry, vB_Database &$dbobject)
 void check_options ()
 bool do_db_fetch (string $itemlist)
 boolean fetch (array $items)
 array prepare_itemarray (array $items)
 string prepare_itemlist (array $items, [bool $prepare_items = false])
 boolean register (string $title, mixed $data, [integer $unserialize_detect = 2])
Variables
static array $registered = array() (line 1393)

All of the entries that have already been fetched

  • var: string
bool $checked_options (line 1421)

Whether we have verified that options were loaded correctly.

vB_Database $dbobject = null (line 1407)

This variable should be set to be a reference to the database object

array $defaultitems = array(
'options',
'bitfields',
'attachmentcache',
'forumcache',
'usergroupcache',
'stylecache',
'languagecache',
'products',
'pluginlist',
'cron',
'profilefield',
'loadcache',
'noticecache'
)
(line 1372)

Default items that are always loaded by fetch();

string $prefix = '' (line 1414)

Unique prefix for item's title, required for multiple forums on the same server using the same classes that read/write to memory

vB_Registry $registry = null (line 1400)

This variable should be set to be a reference to the registry object

Methods
Constructor vB_Datastore (line 1429)

Constructor - establishes the database object to use for datastore queries

vB_Datastore vB_Datastore (vB_Registry &$registry, vB_Database &$dbobject)
check_options (line 1616)

Checks that the options item has come out of the datastore correctly

and sets the 'versionnumber' variable

void check_options ()
do_db_fetch (line 1592)

Performs the actual fetching of the datastore items for the database, child classes may use this

  • return: Valid Query?
bool do_db_fetch (string $itemlist)
  • string $itemlist: title of the datastore item
fetch (line 1570)

Fetches the contents of the datastore from the database

boolean fetch (array $items)
  • array $items: Array of items to fetch from the datastore

Redefined in descendants as:
prepare_itemarray (line 1509)

Prepares a list of items for fetching.

Items that are already fetched are skipped.

  • return: string - An array of items that need to be fetched
array prepare_itemarray (array $items)
  • array $items: string $items - Array of item titles that are required
prepare_itemlist (line 1543)

Prepares an array of items into a list.

The result is a comma delimited, db escaped, quoted list for use in SQL.

  • return: - A sql safe comma delimited list
string prepare_itemlist (array $items, [bool $prepare_items = false])
  • bool $prepare_items:
    • Wether to check the items first
  • array $items: string $items - An array of item titles
register (line 1460)

Sorts the data returned from the cache and places it into appropriate places

boolean register (string $title, mixed $data, [integer $unserialize_detect = 2])
  • string $title: The name of the data item to be processed
  • mixed $data: The data associated with the title
  • integer $unserialize_detect: If the data needs to be unserialized, 0 = no, 1 = yes, 2 = auto detect

Redefined in descendants as:

Documentation generated on Tue, 26 Jan 2010 15:15:05 -0600 by phpDocumentor 1.4.3