Zend_Http_UserAgent-Features_DeviceAtlas.xml 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.http.user-agent-features-device-atlas">
  4. <title>The DeviceAtlas UserAgent Features Adapter</title>
  5. <sect2 id="zend.http.user-agent-features-device-atlas.intro">
  6. <title>Overview</title>
  7. <para>
  8. <ulink url="http://deviceatlas.com/">DeviceAtlas</ulink> provides a comprehensive mobile
  9. device database, in editions ranging from free to enterprise level. The databases
  10. provided with all editions utilize the same API, which is shipped as part of the
  11. DeviceAtlas offering. This particular features adapter interacts with the DeviceAtlas
  12. API in order to return device capabilities.
  13. </para>
  14. </sect2>
  15. <sect2 id="zend.http.user-agent-features-device-atlas.quick-start">
  16. <title>Quick Start</title>
  17. <para>
  18. You will first need to download the DeviceAtlas PHP API, available via their <ulink
  19. url="http://deviceatlas.com/downloads">downloads</ulink> page. Unpack this into your
  20. library, and make note of the directory in which it resides.
  21. </para>
  22. <para>
  23. From there, you may optionally desire to download one of the DeviceAtlas databases; see
  24. their site for details. When you do, make sure you make note of where the data file
  25. resides.
  26. </para>
  27. <para>
  28. Once you have this information, you may configure
  29. <classname>Zend_Http_UserAgent</classname> to utilize it. The easiest way is through
  30. your application configuration.
  31. </para>
  32. <programlisting language="ini"><![CDATA[
  33. resources.useragent.deviceatlas.deviceatlas_lib_dir = APPLICATION_PATH "/../library/DeviceAtlas"
  34. resources.useragent.deviceatlas.deviceatlas_data = APPLICATION_PATH "/../data/DeviceAtlas/json/DeviceAtlas.json
  35. ]]></programlisting>
  36. </sect2>
  37. <sect2 id="zend.http.user-agent-features-device-atlas.options">
  38. <title>Configuration Options</title>
  39. <variablelist>
  40. <title>DeviceAtlas API Options</title>
  41. <varlistentry>
  42. <term>deviceatlas.deviceatlas_lib_dir</term>
  43. <listitem>
  44. <para>
  45. If using the DeviceAtlas API, use this key to specify in which directory the
  46. library exists. If the <classname>Mobi_Mtld_DA_Api</classname> class is
  47. autoloadable, you may omit this setting.
  48. </para>
  49. </listitem>
  50. </varlistentry>
  51. <varlistentry>
  52. <term>deviceatlas.deviceatlas_data</term>
  53. <listitem>
  54. <para>
  55. If using the DeviceAtlas API, use this key to specify the location of the
  56. data file you will use.
  57. </para>
  58. </listitem>
  59. </varlistentry>
  60. </variablelist>
  61. </sect2>
  62. <sect2 id="zend.http.user-agent-features-device-atlas.methods">
  63. <title>Available Methods</title>
  64. <variablelist>
  65. <varlistentry id="zend.http.user-agent-features-device-atlas.methods.get-from-request">
  66. <term>
  67. <methodsynopsis>
  68. <methodname>getFromRequest</methodname>
  69. <methodparam>
  70. <funcparams>array $request, array $config</funcparams>
  71. </methodparam>
  72. </methodsynopsis>
  73. </term>
  74. <listitem>
  75. <para>
  76. Decompose the request in order to return an array of device capabilities.
  77. </para>
  78. </listitem>
  79. </varlistentry>
  80. </variablelist>
  81. </sect2>
  82. </sect1>