Zend_Application-AvailableResources-Useragent.xml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect2 id="zend.application.available-resources.useragent">
  4. <title>Zend_Application_Resource_Useragent</title>
  5. <sect3 id="zend.application.available-resources.useragent.intro">
  6. <title>Overview</title>
  7. <para>
  8. This resource provides the ability to configure and instantiate <link
  9. linkend="zend.http.user-agent">Zend_Http_UserAgent</link> for use within your
  10. application.
  11. </para>
  12. </sect3>
  13. <sect3 id="zend.application.available-resources.useragent.quick-start">
  14. <title>Quick Start</title>
  15. <para>
  16. Using <classname>Zend_Http_UserAgent</classname>, including usage of the application
  17. resource, is covered in the <link
  18. linkend="zend.http.user-agent.quick-start">UserAgent quick start</link>. Below is a
  19. quick summary of typical options you might provide.
  20. </para>
  21. <programlisting language="ini"><![CDATA[
  22. resources.useragent.wurflapi.wurfl_api_version = "1.1"
  23. resources.useragent.wurflapi.wurfl_lib_dir = APPLICATION_PATH "/../library/Wurfl/1.1"
  24. resources.useragent.wurflapi.wurfl_config_file = APPLICATION_PATH "/../library/Wurfl/1.1/resources/wurfl-config.php"
  25. ]]></programlisting>
  26. </sect3>
  27. <sect3 id="zend.application.available-resources.useragent.options">
  28. <title>Configuration Options</title>
  29. <para>
  30. Please see the <link linkend="zend.http.user-agent.options">UserAgent options
  31. section</link> for details on available options.
  32. </para>
  33. </sect3>
  34. <sect3 id="zend.application.available-resources.useragent.methods">
  35. <title>Available Methods</title>
  36. <variablelist>
  37. <varlistentry id="zend.application.available-resources.useragent.methods.init">
  38. <term>
  39. <methodsynopsis>
  40. <methodname>init</methodname>
  41. </methodsynopsis>
  42. </term>
  43. <listitem>
  44. <para>
  45. Called by the bootstrap object to initialize the resource. Calls the
  46. <methodname>getUserAgent()</methodname> method first (and returns the instance
  47. returned by that method); then, if the "view" resource is available, retrieves
  48. it and injects the <classname>UserAgent</classname> instance into the
  49. <classname>UserAgent</classname> view helper.
  50. </para>
  51. </listitem>
  52. </varlistentry>
  53. <varlistentry id="zend.application.available-resources.useragent.methods.get-user-agent">
  54. <term>
  55. <methodsynopsis>
  56. <methodname>getUserAgent</methodname>
  57. </methodsynopsis>
  58. </term>
  59. <listitem>
  60. <para>
  61. Instantiates a <classname>Zend_Http_UserAgent</classname> instance, using the
  62. configuration options provided in the application configuration.
  63. </para>
  64. </listitem>
  65. </varlistentry>
  66. </variablelist>
  67. </sect3>
  68. </sect2>