Word.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. /**
  4. * Element for HTML_QuickForm to display a CAPTCHA "Word"
  5. *
  6. * The HTML_QuickForm_CAPTCHA package adds an element to the
  7. * HTML_QuickForm package to display a CAPTCHA "word".
  8. *
  9. * This package requires the use of a PHP session.
  10. *
  11. * PHP versions 4 and 5
  12. *
  13. * @category HTML
  14. * @package HTML_QuickForm_CAPTCHA
  15. * @author Philippe Jausions <Philippe.Jausions@11abacus.com>
  16. * @copyright 2006-2008 by Philippe Jausions / 11abacus
  17. * @license http://www.opensource.org/licenses/bsd-license.php New BSD
  18. * @version CVS: $Id: Word.php,v 1.1 2008/04/26 23:27:30 jausions Exp $
  19. * @link http://pear.php.net/package/HTML_QuickForm_CAPTCHA
  20. */
  21. /**
  22. * Element for HTML_QuickForm to display a CAPTCHA "word" question
  23. *
  24. * The HTML_QuickForm_CAPTCHA package adds an element to the
  25. * HTML_QuickForm package to display a CAPTCHA "word" question.
  26. *
  27. * Options for the element
  28. * <ul>
  29. * <li>'length' (integer) the length of the Word.</li>
  30. * <li>'mode' (string) 'single' for separated words.</li>
  31. * <li>'locale' (string) locale for Numbers_Words package</li>
  32. * <li>'sessionVar' (string) name of session variable containing
  33. * the Text_CAPTCHA instance (defaults to
  34. * _HTML_QuickForm_CAPTCHA.)</li>
  35. * </ul>
  36. *
  37. * This package requires the use of a PHP session.
  38. *
  39. * @category HTML
  40. * @package HTML_QuickForm_CAPTCHA
  41. * @author Philippe Jausions <Philippe.Jausions@11abacus.com>
  42. * @copyright 2006-2008 by Philippe Jausions / 11abacus
  43. * @license http://www.opensource.org/licenses/bsd-license.php New BSD
  44. * @version Release: 0.3.0
  45. * @link http://pear.php.net/package/HTML_QuickForm_CAPTCHA
  46. * @see Text_CAPTCHA_Driver_Equation
  47. */
  48. class HTML_QuickForm_CAPTCHA_Word extends HTML_QuickForm_CAPTCHA
  49. {
  50. /**
  51. * Default options
  52. *
  53. * @var array
  54. * @access protected
  55. */
  56. var $_options = array(
  57. 'sessionVar' => '_HTML_QuickForm_CAPTCHA',
  58. 'length' => 4,
  59. 'mode' => 'single',
  60. 'locale' => 'en_US',
  61. 'phrase' => null,
  62. );
  63. /**
  64. * CAPTCHA driver
  65. *
  66. * @var string
  67. * @access protected
  68. */
  69. var $_CAPTCHA_driver = 'Word';
  70. }