Zend_Http_UserAgent-Features_Wurfl.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.http.user-agent-features-wurfl">
  4. <title>The WURFL UserAgent Features Adapter</title>
  5. <sect2 id="zend.http.user-agent-features-wurfl.intro">
  6. <title>Overview</title>
  7. <para>
  8. <ulink url="http://wurfl.sourceforge.net/">WURFL</ulink> (Wireless Universal Resource
  9. File) is a database of mobile device capabilities. This class provides a <link
  10. linkend="zend.http.user-agent-features">features adapter</link> that utilizes the
  11. <acronym>WURFL</acronym> PHP API in order to discover mobile device capabilities to
  12. inject into <classname>UserAgent</classname> device instances.
  13. </para>
  14. </sect2>
  15. <sect2 id="zend.http.user-agent-features-wurfl.quick-start">
  16. <title>Quick Start</title>
  17. <para>
  18. Please see the <link linkend="zend.http.user-agent.quick-start">Zend_Http_UserAgent
  19. quick start</link> for an example.
  20. </para>
  21. </sect2>
  22. <sect2 id="zend.http.user-agent-features-wurfl.options">
  23. <title>Configuration Options</title>
  24. <variablelist>
  25. <title>WURFL API Options</title>
  26. <varlistentry>
  27. <term>wurflapi.wurfl_api_version</term>
  28. <listitem>
  29. <para>
  30. If using the <acronym>WURFL</acronym> API, use this key to specify which
  31. version you are using; typically, this will be either "1.0" or "1.1".
  32. </para>
  33. </listitem>
  34. </varlistentry>
  35. <varlistentry>
  36. <term>wurflapi.wurfl_lib_dir</term>
  37. <listitem>
  38. <para>
  39. If using the <acronym>WURFL</acronym> API, use this key to specify in which
  40. directory the library exists.
  41. </para>
  42. </listitem>
  43. </varlistentry>
  44. <varlistentry>
  45. <term>wurflapi.wurfl_config_file</term>
  46. <listitem>
  47. <para>
  48. If using the <acronym>WURFL</acronym> API, use this key to specify the
  49. location of the configuration file you will use; typically, this will be
  50. <filename>resources/wurfl-config.php</filename> within the
  51. <varname>wurfl_lib_dir</varname>.
  52. </para>
  53. </listitem>
  54. </varlistentry>
  55. <varlistentry>
  56. <term>wurflapi.wurfl_config_array.wurfl.main-file</term>
  57. <listitem>
  58. <para>
  59. If using version 1.1 of the <acronym>WURFL</acronym> API, you can omit using
  60. a <varname>wurfl_config_file</varname>, and instead provide an associative
  61. array of configuration values. This particular value indicates the location
  62. of the <filename>wurfl.xml</filename> file containing the actual
  63. <acronym>WURFL</acronym> database.
  64. </para>
  65. </listitem>
  66. </varlistentry>
  67. <varlistentry>
  68. <term>wurflapi.wurfl_config_array.wurfl.patches[]</term>
  69. <listitem>
  70. <para>
  71. If using version 1.1 of the <acronym>WURFL</acronym> API, you can omit using
  72. a <varname>wurfl_config_file</varname>, and instead provide an associative
  73. array of configuration values. This particular value is an array of file
  74. locations containing patchfiles for the <varname>wurfl.main-file</varname>
  75. (which are used to ammend and extend the primary database file).
  76. </para>
  77. </listitem>
  78. </varlistentry>
  79. <varlistentry>
  80. <term>wurflapi.wurfl_config_array.persistence.provider</term>
  81. <listitem>
  82. <para>
  83. If using version 1.1 of the <acronym>WURFL</acronym> API, you can omit using
  84. a <varname>wurfl_config_file</varname>, and instead provide an associative
  85. array of configuration values. This particular value indicates the type of
  86. persistence provider used when caching discovered capabilities. See the
  87. <acronym>WURFL</acronym> documentation for potential values; "file" is a
  88. known good value.
  89. </para>
  90. </listitem>
  91. </varlistentry>
  92. <varlistentry>
  93. <term>wurflapi.wurfl_config_array.persistence.dir</term>
  94. <listitem>
  95. <para>
  96. If using version 1.1 of the <acronym>WURFL</acronym> API, you can omit using
  97. a <varname>wurfl_config_file</varname>, and instead provide an associative
  98. array of configuration values. This particular value indicates the location
  99. where the persistence provider will cache discovered capabilities.
  100. </para>
  101. </listitem>
  102. </varlistentry>
  103. </variablelist>
  104. </sect2>
  105. <sect2 id="zend.http.user-agent-features-wurfl.methods">
  106. <title>Available Methods</title>
  107. <variablelist>
  108. <varlistentry id="zend.http.user-agent-features-wurfl.methods.get-from-request">
  109. <term>
  110. <methodsynopsis>
  111. <methodname>getFromRequest</methodname>
  112. <methodparam>
  113. <funcparams>array $request, array $config</funcparams>
  114. </methodparam>
  115. </methodsynopsis>
  116. </term>
  117. <listitem>
  118. <para>
  119. Decompose the request in order to return an array of device capabilities.
  120. </para>
  121. </listitem>
  122. </varlistentry>
  123. </variablelist>
  124. </sect2>
  125. </sect1>