The UserAgent Features Adapter | Zend_Http Programmer's Reference Guide | The DeviceAtlas UserAgent Features Adapter

# The WURFL UserAgent Features Adapter

# Overview

» WURFL (Wireless Universal Resource File) is a database of mobile device capabilities. This class provides a features adapter that utilizes the WURFL PHP API in order to discover mobile device capabilities to inject into UserAgent device instances.

# Quick Start

Please see the Zend_Http_UserAgent quick start for an example.

# Configuration Options

# WURFL API Options

wurflapi.wurfl_api_version

  If using the WURFL API, use this key to specify which version you are using; typically, this will be either "1.0" or "1.1".

wurflapi.wurfl_lib_dir

  If using the WURFL API, use this key to specify in which directory the library exists.

wurflapi.wurfl_config_file

  If using the WURFL API, use this key to specify the location of the configuration file you will use; typically, this will be resources/wurfl-config.php within the wurfl_lib_dir.

wurflapi.wurfl_config_array.wurfl.main-file

  If using version 1.1 of the WURFL API, you can omit using a wurfl_config_file, and instead provide an associative array of configuration values. This particular value indicates the location of the wurfl.xml file containing the actual WURFL database.

wurflapi.wurfl_config_array.wurfl.patches[]

  If using version 1.1 of the WURFL API, you can omit using a wurfl_config_file, and instead provide an associative array of configuration values. This particular value is an array of file locations containing patchfiles for the wurfl.main-file (which are used to ammend and extend the primary database file).

wurflapi.wurfl_config_array.persistence.provider

  If using version 1.1 of the WURFL API, you can omit using a wurfl_config_file, and instead provide an associative array of configuration values. This particular value indicates the type of persistence provider used when caching discovered capabilities. See the WURFL documentation for potential values; "file" is a known good value.

wurflapi.wurfl_config_array.persistence.dir

  If using version 1.1 of the WURFL API, you can omit using a wurfl_config_file, and instead provide an associative array of configuration values. This particular value indicates the location where the persistence provider will cache discovered capabilities.

# Available Methods

getFromRequest ( array $request, array $config )

  Decompose the request in order to return an array of device capabilities.

The UserAgent Features Adapter | Zend_Http Programmer's Reference Guide | The DeviceAtlas UserAgent Features Adapter