Skip to content

Commit

Permalink
Merge branch 'hotfix/ZF-11522' of https://github.com/adamlundrigan/zf2
Browse files Browse the repository at this point in the history
…into hotfix/zf-11522
  • Loading branch information
weierophinney committed May 7, 2012
2 parents 1ec4f08 + 03f6e43 commit 80c6700
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion Zend/Captcha/Dumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,30 @@
*/
class Dumb extends Word
{
/**
* CAPTCHA label
* @type string
*/
protected $_label = 'Please type this word backwards';

/**
* Set the label for the CAPTCHA
* @param string $label
*/
public function setLabel($label)
{
$this->_label = $label;
}

/**
* Retrieve the label for the CAPTCHA
* @return string
*/
public function getLabel()
{
return $this->_label;
}

/**
* Render the captcha
*
Expand All @@ -46,7 +70,7 @@ class Dumb extends Word
*/
public function render(Renderer $view = null, $element = null)
{
return 'Please type this word backwards: <b>'
return $this->getLabel() . ': <b>'
. strrev($this->getWord())
. '</b>';
}
Expand Down

0 comments on commit 80c6700

Please sign in to comment.