|
@@ -0,0 +1,98 @@
|
|
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
+<!-- Reviewed: no -->
|
|
|
|
|
+<sect1 id="zend.http.user-agent-features-device-atlas">
|
|
|
|
|
+ <title>The DeviceAtlas UserAgent Features Adapter</title>
|
|
|
|
|
+
|
|
|
|
|
+ <sect2 id="zend.http.user-agent-features-device-atlas.intro">
|
|
|
|
|
+ <title>Overview</title>
|
|
|
|
|
+
|
|
|
|
|
+ <para>
|
|
|
|
|
+ <ulink url="http://deviceatlas.com/">DeviceAtlas</ulink> provides a comprehensive mobile
|
|
|
|
|
+ device database, in editions ranging from free to enterprise level. The databases
|
|
|
|
|
+ provided with all editions utilize the same API, which is shipped as part of the
|
|
|
|
|
+ DeviceAtlas offering. This particular features adapter interacts with the DeviceAtlas
|
|
|
|
|
+ API in order to return device capabilities.
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </sect2>
|
|
|
|
|
+
|
|
|
|
|
+ <sect2 id="zend.http.user-agent-features-device-atlas.quick-start">
|
|
|
|
|
+ <title>Quick Start</title>
|
|
|
|
|
+
|
|
|
|
|
+ <para>
|
|
|
|
|
+ You will first need to download the DeviceAtlas PHP API, available via their <ulink
|
|
|
|
|
+ url="http://deviceatlas.com/downloads">downloads</ulink> page. Unpack this into your
|
|
|
|
|
+ library, and make note of the directory in which it resides.
|
|
|
|
|
+ </para>
|
|
|
|
|
+
|
|
|
|
|
+ <para>
|
|
|
|
|
+ From there, you may optionally desire to download one of the DeviceAtlas databases; see
|
|
|
|
|
+ their site for details. When you do, make sure you make note of where the data file
|
|
|
|
|
+ resides.
|
|
|
|
|
+ </para>
|
|
|
|
|
+
|
|
|
|
|
+ <para>
|
|
|
|
|
+ Once you have this information, you may configure
|
|
|
|
|
+ <classname>Zend_Http_UserAgent</classname> to utilize it. The easiest way is through
|
|
|
|
|
+ your application configuration.
|
|
|
|
|
+ </para>
|
|
|
|
|
+
|
|
|
|
|
+ <programlisting language="ini">
|
|
|
|
|
+resources.useragent.deviceatlas.deviceatlas_lib_dir = APPLICATION_PATH "/../library/DeviceAtlas"
|
|
|
|
|
+resources.useragent.deviceatlas.deviceatlas_data = APPLICATION_PATH "/../data/DeviceAtlas/json/DeviceAtlas.json
|
|
|
|
|
+</programlisting>
|
|
|
|
|
+ </sect2>
|
|
|
|
|
+
|
|
|
|
|
+ <sect2 id="zend.http.user-agent-features-device-atlas.options">
|
|
|
|
|
+ <title>Configuration Options</title>
|
|
|
|
|
+
|
|
|
|
|
+ <variablelist>
|
|
|
|
|
+ <title>DeviceAtlas API Options</title>
|
|
|
|
|
+
|
|
|
|
|
+ <varlistentry>
|
|
|
|
|
+ <term>deviceatlas.deviceatlas_lib_dir</term>
|
|
|
|
|
+
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ If using the DeviceAtlas API, use this key to specify in which directory the
|
|
|
|
|
+ library exists. If the <classname>Mobi_Mtld_DA_Api</classname> class is
|
|
|
|
|
+ autoloadable, you may omit this setting.
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ </varlistentry>
|
|
|
|
|
+
|
|
|
|
|
+ <varlistentry>
|
|
|
|
|
+ <term>deviceatlas.deviceatlas_data</term>
|
|
|
|
|
+
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ If using the DeviceAtlas API, use this key to specify the location of the
|
|
|
|
|
+ data file you will use.
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ </varlistentry>
|
|
|
|
|
+ </variablelist>
|
|
|
|
|
+ </sect2>
|
|
|
|
|
+
|
|
|
|
|
+ <sect2 id="zend.http.user-agent-features-device-atlas.methods">
|
|
|
|
|
+ <title>Available Methods</title>
|
|
|
|
|
+
|
|
|
|
|
+ <variablelist>
|
|
|
|
|
+ <varlistentry id="zend.http.user-agent-features-device-atlas.methods.get-from-request">
|
|
|
|
|
+ <term>
|
|
|
|
|
+ <methodsynopsis>
|
|
|
|
|
+ <methodname>getFromRequest</methodname>
|
|
|
|
|
+ <methodparam>
|
|
|
|
|
+ <funcparams>array $request, array $config</funcparams>
|
|
|
|
|
+ </methodparam>
|
|
|
|
|
+ </methodsynopsis>
|
|
|
|
|
+ </term>
|
|
|
|
|
+
|
|
|
|
|
+ <listitem>
|
|
|
|
|
+ <para>
|
|
|
|
|
+ Decompose the request in order to return an array of device capabilities.
|
|
|
|
|
+ </para>
|
|
|
|
|
+ </listitem>
|
|
|
|
|
+ </varlistentry>
|
|
|
|
|
+ </variablelist>
|
|
|
|
|
+ </sect2>
|
|
|
|
|
+</sect1>
|