Zend_Application-AvailableResources-Useragent.xml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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">
  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. <refentry id="zend.application.available-resources.useragent.methods.init">
  37. <refnamediv>
  38. <refname>init</refname>
  39. <refpurpose>Bootstrap/initialize the resource</refpurpose>
  40. </refnamediv>
  41. <refsynopsisdiv>
  42. <methodsynopsis>
  43. <methodname>init</methodname>
  44. </methodsynopsis>
  45. </refsynopsisdiv>
  46. <refsect1>
  47. <title>init()</title>
  48. <para>
  49. Called by the bootstrap object to initialize the resource. Calls the
  50. <methodname>getUserAgent()</methodname> method first (and returns the instance
  51. returned by that method); then, if the "view" resource is available, retrieves
  52. it and injects the <classname>UserAgent</classname> instance into the
  53. <classname>UserAgent</classname> view helper.
  54. </para>
  55. </refsect1>
  56. </refentry>
  57. <refentry id="zend.application.available-resources.useragent.methods.get-user-agent">
  58. <refnamediv>
  59. <refname>getUserAgent</refname>
  60. <refpurpose>Retrieve a configured UserAgent instance</refpurpose>
  61. </refnamediv>
  62. <refsynopsisdiv>
  63. <methodsynopsis>
  64. <methodname>getUserAgent</methodname>
  65. </methodsynopsis>
  66. </refsynopsisdiv>
  67. <refsect1>
  68. <title>getUserAgent()</title>
  69. <para>
  70. Instantiates a <classname>Zend_Http_UserAgent</classname> instance, using the
  71. configuration options provided in the application configuration.
  72. </para>
  73. </refsect1>
  74. </refentry>
  75. </sect3>
  76. </sect2>