equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Captcha |
16 * @package Zend_Captcha |
17 * @subpackage Adapter |
17 * @subpackage Adapter |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 */ |
20 */ |
21 |
21 |
22 /** @see Zend_Captcha_Base */ |
22 /** @see Zend_Captcha_Base */ |
23 require_once 'Zend/Captcha/Base.php'; |
23 require_once 'Zend/Captcha/Base.php'; |
33 * @see http://recaptcha.net/apidocs/captcha/ |
33 * @see http://recaptcha.net/apidocs/captcha/ |
34 * |
34 * |
35 * @category Zend |
35 * @category Zend |
36 * @package Zend_Captcha |
36 * @package Zend_Captcha |
37 * @subpackage Adapter |
37 * @subpackage Adapter |
38 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
38 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
39 * @license http://framework.zend.com/license/new-bsd New BSD License |
39 * @license http://framework.zend.com/license/new-bsd New BSD License |
40 * @version $Id: ReCaptcha.php 20096 2010-01-06 02:05:09Z bkarwin $ |
40 * @version $Id: ReCaptcha.php 24593 2012-01-05 20:35:02Z matthew $ |
41 */ |
41 */ |
42 class Zend_Captcha_ReCaptcha extends Zend_Captcha_Base |
42 class Zend_Captcha_ReCaptcha extends Zend_Captcha_Base |
43 { |
43 { |
44 /**@+ |
44 /**@+ |
45 * ReCaptcha Field names |
45 * ReCaptcha Field names |
259 * @param mixed $element |
259 * @param mixed $element |
260 * @return string |
260 * @return string |
261 */ |
261 */ |
262 public function render(Zend_View_Interface $view = null, $element = null) |
262 public function render(Zend_View_Interface $view = null, $element = null) |
263 { |
263 { |
264 return $this->getService()->getHTML(); |
264 $name = null; |
|
265 if ($element instanceof Zend_Form_Element) { |
|
266 $name = $element->getBelongsTo(); |
|
267 } |
|
268 return $this->getService()->getHTML($name); |
|
269 } |
|
270 |
|
271 /** |
|
272 * Get captcha decorator |
|
273 * |
|
274 * @return string |
|
275 */ |
|
276 public function getDecorator() |
|
277 { |
|
278 return "Captcha_ReCaptcha"; |
265 } |
279 } |
266 } |
280 } |