web/enmi/Zend/Captcha/Adapter.php
changeset 19 1c2f13fd785c
parent 0 4eba9c11703f
equal deleted inserted replaced
18:bd595ad770fc 19:1c2f13fd785c
       
     1 <?php
       
     2 /**
       
     3  * Zend Framework
       
     4  *
       
     5  * LICENSE
       
     6  *
       
     7  * This source file is subject to the new BSD license that is bundled
       
     8  * with this package in the file LICENSE.txt.
       
     9  * It is also available through the world-wide-web at this URL:
       
    10  * http://framework.zend.com/license/new-bsd
       
    11  * If you did not receive a copy of the license and are unable to
       
    12  * obtain it through the world-wide-web, please send an email
       
    13  * to license@zend.com so we can send you a copy immediately.
       
    14  *
       
    15  * @category   Zend
       
    16  * @package    Zend_Captcha
       
    17  * @subpackage Adapter
       
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    20  */
       
    21 
       
    22 /** @see Zend_Validate_Interface */
       
    23 require_once 'Zend/Validate/Interface.php';
       
    24 
       
    25 /**
       
    26  * Generic Captcha adapter interface
       
    27  *
       
    28  * Each specific captcha implementation should implement this interface
       
    29  *
       
    30  * @category   Zend
       
    31  * @package    Zend_Captcha
       
    32  * @subpackage Adapter
       
    33  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    34  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    35  * @version    $Id: Adapter.php 20096 2010-01-06 02:05:09Z bkarwin $
       
    36  */
       
    37 interface Zend_Captcha_Adapter extends Zend_Validate_Interface
       
    38 {
       
    39     /**
       
    40      * Generate a new captcha
       
    41      *
       
    42      * @return string new captcha ID
       
    43      */
       
    44     public function generate();
       
    45 
       
    46     /**
       
    47      * Display the captcha
       
    48      *
       
    49      * @param  Zend_View_Interface $view
       
    50      * @param  mixed $element
       
    51      * @return string
       
    52      */
       
    53     public function render(Zend_View_Interface $view = null, $element = null);
       
    54 
       
    55     /**
       
    56      * Set captcha name
       
    57      *
       
    58      * @param  string $name
       
    59      * @return Zend_Captcha_Adapter
       
    60      */
       
    61     public function setName($name);
       
    62 
       
    63     /**
       
    64      * Get captcha name
       
    65      *
       
    66      * @return string
       
    67      */
       
    68     public function getName();
       
    69 
       
    70     /**
       
    71      * Get optional private decorator for this captcha type
       
    72      *
       
    73      * @return Zend_Form_Decorator_Interface|string
       
    74      */
       
    75     public function getDecorator();
       
    76 }