Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Zend_Captcha
-
Labels:None
-
Tags:
Description
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.
Using examples:
$captcha = Zend_Captcha::factory(
'Mao_Captcha_FigletCopy',
array(
'name' => 'foo',
'wordLen' => 6
)
);
$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.
Zend_Captcha factory suggestion