Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Captcha_Block_Captcha
  • Mage_Captcha_Block_Captcha_Zend
  • Mage_Captcha_Helper_Data
  • Mage_Captcha_Model_Config_Font
  • Mage_Captcha_Model_Config_Form_Abstract
  • Mage_Captcha_Model_Config_Form_Backend
  • Mage_Captcha_Model_Config_Form_Frontend
  • Mage_Captcha_Model_Config_Mode
  • Mage_Captcha_Model_Observer
  • Mage_Captcha_Model_Resource_Log
  • Mage_Captcha_Model_Zend

Interfaces

  • Mage_Captcha_Model_Interface
  • Overview
  • Package
  • Class
  • Tree

Class Mage_Captcha_Model_Zend

Implementation of Zend_Captcha

Zend_Captcha_Image
Extended by Mage_Captcha_Model_Zend implements Mage_Captcha_Model_Interface
Package: Mage\Captcha
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Captcha/Model/Zend.php
Methods summary
public
# __construct( array $params )

Zend captcha constructor

Zend captcha constructor

Parameters

$params
array
$params
protected string
# _getFormIdKey( string $key )

Returns key with respect of current form ID

Returns key with respect of current form ID

Parameters

$key
string
$key

Returns

string
public string
# getBlockName( )

Get Block Name

Get Block Name

Returns

string

Implementation of

Mage_Captcha_Model_Interface::getBlockName()
public boolean
# isRequired( null|string $login = null )

Whether captcha is required to be inserted to this form

Whether captcha is required to be inserted to this form

Parameters

$login
null|string
$login

Returns

boolean
protected boolean
# _isOverLimitAttempts( string $login )

Check is overlimit attempts

Check is overlimit attempts

Parameters

$login
string
$login

Returns

boolean
protected integer
# _getAllowedAttemptsForSameLogin( )

Returns number of allowed attempts for same login

Returns number of allowed attempts for same login

Returns

integer
protected integer
# _getAllowedAttemptsFromSameIp( )

Returns number of allowed attempts from same IP

Returns number of allowed attempts from same IP

Returns

integer
protected boolean
# _isOverLimitIpAttempt( )

Check is overlimit saved attempts from one ip

Check is overlimit saved attempts from one ip

Returns

boolean
protected boolean
# _isOverLimitLoginAttempts( string $login )

Is Over Limit Login Attempts

Is Over Limit Login Attempts

Parameters

$login
string
$login

Returns

boolean
protected boolean
# _isUserAuth( )

Check is user auth

Check is user auth

Returns

boolean
public boolean
# isCaseSensitive( )

Whether to respect case while checking the answer

Whether to respect case while checking the answer

Returns

boolean
public string
# getFont( )

Get font to use when generating captcha

Get font to use when generating captcha

Returns

string
public integer
# getTimeout( )

After this time isCorrect() is going to return FALSE even if word was guessed correctly

After this time isCorrect() is going to return FALSE even if word was guessed correctly

Returns

integer
public string
# getImgDir( )

Get captcha image directory

Get captcha image directory

Returns

string
public string
# getImgUrl( )

Get captcha image base URL

Get captcha image base URL

Returns

string
public boolean
# isCorrect( string $word )

Checks whether captcha was guessed correctly by user

Checks whether captcha was guessed correctly by user

Parameters

$word
string
$word

Returns

boolean

Implementation of

Mage_Captcha_Model_Interface::isCorrect()
public Mage_Customer_Model_Session
# getSession( )

Returns session instance

Returns session instance

Returns

Mage_Customer_Model_Session
public string
# getImgSrc( )

Return full URL to captcha image

Return full URL to captcha image

Returns

string
public Mage_Captcha_Model_Zend
# logAttempt( string $login )

log Attempt

log Attempt

Parameters

$login
string
$login

Returns

Mage_Captcha_Model_Zend
protected string
# _getFontPath( )

Returns path for the font file, chosen to generate captcha

Returns path for the font file, chosen to generate captcha

Returns

string
protected Mage_Captcha_Helper_Data
# _getHelper( )

Returns captcha helper

Returns captcha helper

Returns

Mage_Captcha_Helper_Data
protected string
# _generateWord( )

Generate word used for captcha render

Generate word used for captcha render

Returns

string
protected array
# _getSymbols( )

Get symbols array to use for word generation

Get symbols array to use for word generation

Returns

array
protected integer
# _getWordLen( )

Returns length for generating captcha word. This value may be dynamic.

Returns length for generating captcha word. This value may be dynamic.

Returns

integer
protected boolean
# _isShowAlways( )

Whether to show captcha for this form every time

Whether to show captcha for this form every time

Returns

boolean
protected boolean
# _isEnabled( )

Whether captcha is enabled at this area

Whether captcha is enabled at this area

Returns

boolean
protected array
# _getTargetForms( )

Retrieve list of forms where captcha must be shown

Retrieve list of forms where captcha must be shown

For frontend this list is based on current website

Returns

array
public string
# getWord( )

Get captcha word

Get captcha word

Returns

string
protected Zend_Captcha_Word
# _setWord( string $word )

Set captcha word

Set captcha word

Parameters

$word
string
$word

Returns

Zend_Captcha_Word
protected Mage_Captcha_Model_Zend
# _clearWord( )

Set captcha word

Set captcha word

Returns

Mage_Captcha_Model_Zend
protected integer
# _randomSize( )

Override function to generate less curly captcha that will not cut off

Override function to generate less curly captcha that will not cut off

Returns

integer

See

Zend_Captcha_Image::_randomSize()
protected
# _gc( )

Overlap of the parent method

Overlap of the parent method

Now deleting old captcha images make crontab script

See

Mage_Captcha_Model_Observer::deleteExpiredImages()
Methods inherited from Mage_Captcha_Model_Interface
generate()
Constants summary
string SESSION_WORD 'word'
#

Key in session for captcha code

Key in session for captcha code

integer DEFAULT_WORD_LENGTH_FROM 3
#

Min captcha lengths default value

Min captcha lengths default value

integer DEFAULT_WORD_LENGTH_TO 5
#

Max captcha lengths default value

Max captcha lengths default value

Properties summary
protected Mage_Captcha_Helper_Data $_helper null
#

Helper Instance

Helper Instance

protected integer $_expiration
#

Captcha expire time

Captcha expire time

protected integer $_fsize 22
#

Override default value to prevent a captcha cut off

Override default value to prevent a captcha cut off

See

Zend_Captcha_Image::$_fsize
protected string $_formId
#

Captcha form id

Captcha form id

Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0