PHP Class ManaPHP\Security\Captcha

Inheritance: extends ManaPHP\Component, implements ManaPHP\Security\CaptchaInterface
Afficher le fichier Open project: manaphp/manaphp

Protected Properties

Свойство Type Description
$_angleAmplitude integer
$_bgRGB string
$_charset string
$_fonts array
$_length integer
$_minInterval integer
$_noiseCharCount integer
$_sessionVar string

Méthodes publiques

Méthode Description
__construct ( array | Captcha $options = [] ) Captcha constructor.
generate ( integer $width = 100, integer $height = 30, integer $ttl = 300 ) : ManaPHP\Http\ResponseInterface
setNoiseCharCount ( integer $count ) : static
tryVerify ( string $code ) : void
verify ( string $code ) : void

Méthodes protégées

Méthode Description
_generateByGd ( string $code, integer $width, integer $height ) : string
_generateByImagic ( string $code, integer $width, integer $height ) : ManaPHP\Http\ResponseInterface
_rand_amplitude ( float $a ) : float
_verify ( string $code, boolean $isTry ) : void

Method Details

__construct() public méthode

Captcha constructor.
public __construct ( array | Captcha $options = [] )
$options array | ConfManaPHP\Security\Captcha

_generateByGd() protected méthode

protected _generateByGd ( string $code, integer $width, integer $height ) : string
$code string
$width integer
$height integer
Résultat string

_generateByImagic() protected méthode

protected _generateByImagic ( string $code, integer $width, integer $height ) : ManaPHP\Http\ResponseInterface
$code string
$width integer
$height integer
Résultat ManaPHP\Http\ResponseInterface

_rand_amplitude() protected méthode

protected _rand_amplitude ( float $a ) : float
$a float
Résultat float

_verify() protected méthode

protected _verify ( string $code, boolean $isTry ) : void
$code string
$isTry boolean
Résultat void

generate() public méthode

public generate ( integer $width = 100, integer $height = 30, integer $ttl = 300 ) : ManaPHP\Http\ResponseInterface
$width integer
$height integer
$ttl integer
Résultat ManaPHP\Http\ResponseInterface

setNoiseCharCount() public méthode

public setNoiseCharCount ( integer $count ) : static
$count integer
Résultat static

tryVerify() public méthode

public tryVerify ( string $code ) : void
$code string
Résultat void

verify() public méthode

public verify ( string $code ) : void
$code string
Résultat void

Property Details

$_angleAmplitude protected_oe property

protected int $_angleAmplitude
Résultat integer

$_bgRGB protected_oe property

protected string $_bgRGB
Résultat string

$_charset protected_oe property

protected string $_charset
Résultat string

$_fonts protected_oe property

protected array $_fonts
Résultat array

$_length protected_oe property

protected int $_length
Résultat integer

$_minInterval protected_oe property

protected int $_minInterval
Résultat integer

$_noiseCharCount protected_oe property

protected int $_noiseCharCount
Résultat integer

$_sessionVar protected_oe property

protected string $_sessionVar
Résultat string