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

Class: TeraWurflDatabase_PDO_NestedSet

Source Location: /DatabaseConnectors/TeraWurflDatabase_PDO_NestedSet.php

Class Overview

TeraWurflDatabase
   |
   --TeraWurflDatabase_PDO
      |
      --TeraWurflDatabase_PDO_NestedSet

Provides connectivity from Tera-WURFL to MySQL 5 This version adds a right and left nested-set value (`rt` and `lt`) to the TeraWurflIndex table, then uses those values and the Nested Set method to lookup the fallback tree in one very efficient query.


Variables


Inherited Variables

Inherited Methods

Class: TeraWurflDatabase_PDO

TeraWurflDatabase_PDO::__construct()
TeraWurflDatabase_PDO::clearMatcherTables()
Drops then creates all the UserAgentMatcher device tables
TeraWurflDatabase_PDO::clearTable()
TeraWurflDatabase_PDO::connect()
TeraWurflDatabase_PDO::createCacheTable()
TeraWurflDatabase_PDO::createGenericDeviceTable()
Drops and creates the given device table
TeraWurflDatabase_PDO::createIndexTable()
Drops and creates the index table
TeraWurflDatabase_PDO::createMergeTable()
Drops and creates the MERGE table
TeraWurflDatabase_PDO::createProcedures()
TeraWurflDatabase_PDO::createSettingsTable()
Creates the settings table if it does not already exist
TeraWurflDatabase_PDO::createTempCacheTable()
TeraWurflDatabase_PDO::extensionLoaded()
Returns true if the required extensions for this database connector are loaded
TeraWurflDatabase_PDO::getActualDeviceAncestor()
TeraWurflDatabase_PDO::getCachedUserAgents()
TeraWurflDatabase_PDO::getDeviceFallBackTree()
TeraWurflDatabase_PDO::getDeviceFallBackTree_NS()
Returns an Array containing the complete capabilities array for each
TeraWurflDatabase_PDO::getDeviceFromCache()
TeraWurflDatabase_PDO::getDeviceFromID()
TeraWurflDatabase_PDO::getDeviceFromUA()
TeraWurflDatabase_PDO::getDeviceFromUA_LD()
TeraWurflDatabase_PDO::getDeviceFromUA_RIS()
TeraWurflDatabase_PDO::getFullDeviceList()
TeraWurflDatabase_PDO::getMatcherTableList()
TeraWurflDatabase_PDO::getServerVersion()
TeraWurflDatabase_PDO::getSetting()
TeraWurflDatabase_PDO::getTableList()
TeraWurflDatabase_PDO::getTableStats()
TeraWurflDatabase_PDO::loadDevices()
TeraWurflDatabase_PDO::rebuildCacheTable()
TeraWurflDatabase_PDO::saveDeviceInCache()
TeraWurflDatabase_PDO::SQLPrep()
TeraWurflDatabase_PDO::updateSetting()
TeraWurflDatabase_PDO::verifyConfig()
TeraWurflDatabase_PDO::__destruct()
Destructor, disconnect from database

Class: TeraWurflDatabase

TeraWurflDatabase::__construct()
TeraWurflDatabase::atomicRenameAll()
Rename all tables from $oldPrefix to $newPrefix in one transaction. This is used when loading the WURFL device data to atomically switch from the old data to the new data.
TeraWurflDatabase::clearTable()
Truncate or drop+create the given table
TeraWurflDatabase::connect()
Establishes a database connection and stores connection in $this->dbcon
TeraWurflDatabase::createCacheTable()
Creates the cache table
TeraWurflDatabase::createGenericDeviceTable()
Creates a table capable of holding devices (WURFL ID, User Agent and Capabilities)
TeraWurflDatabase::createIndexTable()
Creates the index table
TeraWurflDatabase::createProcedures()
Creates supporting stored procedures
TeraWurflDatabase::createSettingsTable()
Creates the settings table
TeraWurflDatabase::getActualDeviceAncestor()
Returns the WURFL ID for the Actual Device Root in the given device's fall back tree. This can be null if it does not exist.
TeraWurflDatabase::getCachedUserAgents()
Returns an array of the cached User Agents
TeraWurflDatabase::getDeviceFallBackTree()
Returns the Fallback tree directly from the database. If this is implemented, you must set TeraWurflDatabase::$db_implements_fallback = true for Tera-WURFL to use it.
TeraWurflDatabase::getDeviceFromCache()
Return capabilities array for the given User Agent, or null if not found
TeraWurflDatabase::getDeviceFromID()
Returns the capabilities array from a given WURFL Device ID. This is NOT the full device capabilities, just the capabilities that are defined on this device.
TeraWurflDatabase::getDeviceFromUA()
Returns the WURFL ID from a raw User Agent if an exact match is found
TeraWurflDatabase::getDeviceFromUA_LD()
Find the matching Device ID for a given User Agent using LD (Leveshtein Distance)
TeraWurflDatabase::getDeviceFromUA_RIS()
Find the matching Device ID for a given User Agent using RIS (Reduction in String)
TeraWurflDatabase::getFullDeviceList()
Returns an associative array of all the data from the given table in the form [WURFL ID] => [User Agent]
TeraWurflDatabase::getLastError()
Returns the most recent error message
TeraWurflDatabase::getMatcherTableList()
Returns an array of the User Agent Matcher tables in the database
TeraWurflDatabase::getServerVersion()
Returns the version string of the database server
TeraWurflDatabase::getSetting()
Get setting from settings table by a given key
TeraWurflDatabase::getTableList()
Returns an array of all the tables in the database
TeraWurflDatabase::getTableStats()
Returns an associative array of statistics from given table
TeraWurflDatabase::initializeDB()
Drops and recreates the current database and procedures
TeraWurflDatabase::isNumericSafe()
Returns true if the value is numeric. Unlike is_numeric, this functions returns
TeraWurflDatabase::loadDevices()
Loads the pre-processed WURFL tables into the database
TeraWurflDatabase::rebuildCacheTable()
Rebuilds the cache table by redetecting the cached devices against the loaded WURFL
TeraWurflDatabase::saveDeviceInCache()
Save the given User Agent and Device capabilities array to the database
TeraWurflDatabase::SQLPrep()
Prepares raw text for use in queries (adding quotes and escaping characters if necessary)
TeraWurflDatabase::updateSetting()
Adds/updates a key=>value pair in the settings table
TeraWurflDatabase::verifyConfig()
Checks if the database configuration is correct and that all required permissions

Class Details

[line 29]
Provides connectivity from Tera-WURFL to MySQL 5 This version adds a right and left nested-set value (`rt` and `lt`) to the TeraWurflIndex table, then uses those values and the Nested Set method to lookup the fallback tree in one very efficient query.



[ Top ]


Class Variables

$use_nested_set =  true

[line 30]



Tags:

access:  public

Type:   mixed
Overrides:   Array


[ Top ]



Documentation generated on Thu, 03 Oct 2013 15:19:19 -0400 by phpDocumentor 1.4.4