Issue Type: New Feature Created: 2009-01-16T00:36:03.000+0000 Last Updated: 2012-11-20T21:38:07.000+0000 Status: Open Fix version(s): Reporter: Krzysztof Szatanik (diabl0) Assignee: None Tags: - Zend_Captcha
Related issues: Attachments: - Captcha.php
I'm really wondered why there isn't any Factory object for this component. It will be very usefully to have such factory that connected with Zend_Config can make our life and project management much more easier. So i decided to write one.
It's based on Zend_Cache::factory, and except ReCaptcha it works well. With ReCaptcha there is small problem with isValid method - it has different syntax, and without changing isValid part inside your code you can't easy change from eg. Zend_Captcha_Image to Zend_Captcha_ReCaptcha.
<pre class="highlight"> $captcha = Zend_Captcha::factory( 'Mao_Captcha_FigletCopy', array( 'name' => 'foo', 'wordLen' => 6 ) ); <pre class="highlight"> $captcha = Zend_Captcha::factory( 'Image', array( 'name' => 'foo', 'wordLen' => 6, 'font' => APPLICATION_PATH .'library/html2pdf/font/verdana.ttf', 'imgDir' => APPLICATION_PATH .'public_html/temp/', 'imgUrl' => '/temp/' ) );
I hope that one of ZF developer can take a look at it and include such kind of Zend_Captcha::factory into ZF.
Posted by Krzysztof Szatanik (diabl0) on 2009-01-16T00:36:46.000+0000
Zend_Captcha factory suggestion
Posted by Stanislav Malyshev (stas) on 2010-04-07T18:05:02.000+0000
ivValid seems to have the same signature on both Zend_Captcha_Word and Zend_Captcha_Recaptcha:
public function isValid($value, $context = null)
could you clarify what did you mean?
Have you found an issue?
See the Overview section for more details.