Handles mapping capabilities to a device
public __construct($oDevice)
Returns a new instance of wurflDeviceCapabilities
public static getInstance($oDevice)
Returns an instance of wurflDeviceCapabilities
public toArray()
Returns properties of object as an array
public isModified()
Returns true if the object has been modified
public load()
Load the object based on properties
Properties are loaded via a single UNION statement reducing the number of DB calls to only one. From testing, issuing a single UNION is faster than multiple individual selects per path device. Even 11 UNION joins results in a query that executes in under .05 seconds.
Tested on MySQL 5.1.30 WAMP Server 2.0g, Windows XP, P4 3.2GHz, 2GB ram. Fetching: SonyEricssonW880i and LG/U890/v1.0
public save()
Commits the object and any changes to the database, returns number of updated objects
public delete()
Deletes the object and any sub-objects
public reset()
Resets object properties to defaults
public getWurflDevice()
Returns WurflDevice
public setWurflDevice($WurflDevice)
Set WurflDevice property
public getObject($inCapability)
Returns an object from the list with key $inCapability
public setCapability($inCapability, $inValue)
Add capability to device
public setCustomCapability($inCapability, $inValue)
Sets a custom value to a capability overriding the WURFL value, always assigns the current deviceID to the capability
public getCapability($inCapability)
Returns the capability value; if a custom value has been set this will be returned instead
public removeCapability($inCapability)
Removes a capability from the device
public countCapabilities()
Returns the total number of capabilities loaded into the device
Posted by: Scorpio Documentor (Writer), in Wurfl on 19 Nov 2009 @ 20:39
Tags: baseset, countable, iteratoraggregate, systemdaointerface, traversable, wurfl, wurfldevicecapabilities,
This
work is licenced under a
Creative Commons Licence.