File indexing completed on 2025-02-02 05:48:53
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Captcha 0017 * @subpackage Adapter 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 */ 0021 0022 /** @see Zend_Validate_Interface */ 0023 // require_once 'Zend/Validate/Interface.php'; 0024 0025 /** 0026 * Generic Captcha adapter interface 0027 * 0028 * Each specific captcha implementation should implement this interface 0029 * 0030 * @category Zend 0031 * @package Zend_Captcha 0032 * @subpackage Adapter 0033 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0034 * @license http://framework.zend.com/license/new-bsd New BSD License 0035 * @version $Id$ 0036 */ 0037 interface Zend_Captcha_Adapter extends Zend_Validate_Interface 0038 { 0039 /** 0040 * Generate a new captcha 0041 * 0042 * @return string new captcha ID 0043 */ 0044 public function generate(); 0045 0046 /** 0047 * Display the captcha 0048 * 0049 * @param Zend_View_Interface $view 0050 * @param mixed $element 0051 * @return string 0052 */ 0053 public function render(Zend_View_Interface $view = null, $element = null); 0054 0055 /** 0056 * Set captcha name 0057 * 0058 * @param string $name 0059 * @return Zend_Captcha_Adapter 0060 */ 0061 public function setName($name); 0062 0063 /** 0064 * Get captcha name 0065 * 0066 * @return string 0067 */ 0068 public function getName(); 0069 0070 /** 0071 * Get optional private decorator for this captcha type 0072 * 0073 * @return Zend_Form_Decorator_Interface|string 0074 */ 0075 public function getDecorator(); 0076 }