Zend_Http_UserAgent-Features_TeraWurfl.xml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.http.user-agent-features-tera-wurfl">
  4. <title>The TeraWurfl UserAgent Features Adapter</title>
  5. <sect2 id="zend.http.user-agent-features-tera-wurfl.intro">
  6. <title>Overview</title>
  7. <para>
  8. <ulink url="">TeraWurfl</ulink> parses the <link
  9. linkend="zend.http.user-agent-features-wurfl">WURFL</link> database into a MySQL
  10. database, and provides an API for querying that database for mobile device capabilies.
  11. The API also performs rigorous caching, leading to excellent performance.
  12. </para>
  13. </sect2>
  14. <sect2 id="zend.http.user-agent-features-tera-wurfl.quick-start">
  15. <title>Quick Start</title>
  16. <para>
  17. You will need to <ulink
  18. url="http://www.tera-wurfl.com/wiki/index.php/Downloads">download</ulink> and <ulink
  19. url="http://www.tera-wurfl.com/wiki/index.php/Installation">install</ulink>
  20. TeraWurfl. Make a note of where you install the library
  21. (<filename>TeraWurfl.php</filename>); we recommend installing it in your application's
  22. <filename>library</filename> directory.
  23. </para>
  24. <para>
  25. Once installed, the easiest way to use TeraWurfl is to configure it via the application
  26. resource.
  27. </para>
  28. <programlisting language="ini"><![CDATA[
  29. resources.useragent.terawurfl.terawurfl_lib_dir = APPLICATION_PATH "/../library/"
  30. ]]></programlisting>
  31. <para>
  32. If the file is autoloadable, you can also specify an empty configuration in order to
  33. utilize the adapter.
  34. </para>
  35. <programlisting language="ini"><![CDATA[
  36. resources.useragent.terawurfl[] =
  37. ]]></programlisting>
  38. </sect2>
  39. <sect2 id="zend.http.user-agent-features-tera-wurfl.options">
  40. <title>Configuration Options</title>
  41. <variablelist>
  42. <title>TeraWurfl API Options</title>
  43. <varlistentry>
  44. <term>terawurfl.terawurfl_lib_dir</term>
  45. <listitem>
  46. <para>
  47. If using the TeraWurfl API, use this key to specify in which
  48. directory the <filename>TeraWurfl.php</filename> file exists.
  49. </para>
  50. </listitem>
  51. </varlistentry>
  52. </variablelist>
  53. </sect2>
  54. <sect2 id="zend.http.user-agent-features-tera-wurfl.methods">
  55. <title>Available Methods</title>
  56. <variablelist>
  57. <varlistentry id="zend.http.user-agent-features-tera-wurfl.methods.get-from-request">
  58. <term>
  59. <methodsynopsis>
  60. <methodname>getFromRequest</methodname>
  61. <methodparam>
  62. <funcparams>array $request, array $config</funcparams>
  63. </methodparam>
  64. </methodsynopsis>
  65. </term>
  66. <listitem>
  67. <para>
  68. Decompose the request in order to return an array of device capabilities.
  69. </para>
  70. </listitem>
  71. </varlistentry>
  72. </variablelist>
  73. </sect2>
  74. </sect1>