agent.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. /**
  3. * Part of the Fuel framework.
  4. *
  5. * @package Fuel
  6. * @version 1.5
  7. * @author Fuel Development Team
  8. * @license MIT License
  9. * @copyright 2010 - 2013 Fuel Development Team
  10. * @link http://fuelphp.com
  11. */
  12. /**
  13. * NOTICE:
  14. *
  15. * If you need to make modifications to the default configuration, copy
  16. * this file to your app/config folder, and make them in there.
  17. *
  18. * This will allow you to upgrade fuel without losing your custom config.
  19. */
  20. return array(
  21. /**
  22. * Manual browscap parsing configuration.
  23. *
  24. * This will be used when your PHP installation has no browscap defined
  25. * in your php.ini, httpd.conf or .htaccess, and you can't configure one.
  26. */
  27. 'browscap' => array(
  28. /**
  29. * Whether of not manual parsing is enabled.
  30. *
  31. * set to false to disable this functionality.
  32. */
  33. 'enabled' => true,
  34. /**
  35. * Location from where the updated browscap file can be downloaded.
  36. *
  37. * Note: these are temporary links awaiting relaunch of the browscap project
  38. */
  39. 'url' => 'http://tempdownloads.browserscap.com/stream.asp?Lite_PHP_BrowsCapINI', // only major browsers and search engines
  40. //'url' => 'http://tempdownloads.browserscap.com/stream.asp?Full_PHP_BrowscapINI', // complete file, approx. 3 times the lite version
  41. /**
  42. * Method used to download the updated browscap file
  43. *
  44. * Default: 'wrapper'
  45. *
  46. * possible values are: 'local', 'wrapper', 'curl'
  47. */
  48. 'method' => 'wrapper',
  49. /**
  50. * Filename for the local browscap.ini file (for method 'local').
  51. *
  52. * Default: ''
  53. */
  54. 'file' => '/tmp/php_browscap.ini',
  55. ),
  56. /**
  57. * Cache configuration.
  58. *
  59. * The agent class caches all matched agent strings for future reference
  60. * so the browscap file doesn't need to be loaded, as it's quite large.
  61. *
  62. * Also, the parsed and condensed browscap ini file is stored in cache as
  63. * well, so when a new user agent string needs to be looked up, no further
  64. * parsing is needed.
  65. */
  66. 'cache' => array(
  67. /**
  68. * Storage driver to use to cache agent class entries. If not defined,
  69. * the default driver defined in config/cache.php will be used.
  70. *
  71. * Default: ''
  72. */
  73. 'driver' => '',
  74. /**
  75. * Cache expiry.
  76. *
  77. * Number of seconds after which a cached agent result expires.
  78. *
  79. * Default: 604800 (every 7 days)
  80. *
  81. * Note that to prevent abuse of the site publishing the browsecap files,
  82. * you can not set the expiry time lower than 7200 (2 hours)
  83. */
  84. 'expiry' => 604800,
  85. /**
  86. * Identifier used to store agent class cache elements
  87. *
  88. * Default: 'fuel.agent'
  89. *
  90. */
  91. 'identifier' => 'fuel.agent',
  92. ),
  93. );