PHP 클래스 SlightPHP\SimpleCaptcha

파일 보기 프로젝트 열기: hetao29/slightphp

공개 프로퍼티들

프로퍼티 타입 설명
$Xamplitude
$Xperiod
$Yamplitude
$Yperiod Wave configuracion in X and Y axes
$backgroundColor Background color in RGB-array
$blur Better image results with scale=3
$colors Foreground colors in RGB-array
$debug Debug?
$fonts - font: TTF file - spacing: relative pixel space between character - minSize: min font size - maxSize: max font size
$height Height of the image
$im GD image
$imageFormat Image format: jpeg or png
$maxRotation letter rotation clockwise
$maxWordLength Used for dictionary words indicating the word-length for font-size modification purposes
$minWordLength Min word length (for non-dictionary random text generation)
$scale Internal image size factor (for better image quality) 1: low, 2: medium, 3: high
$session_var Sessionname to store the original text
$shadowColor Shadow color in RGB-array or false
$transprent
$width Width of the image
$wordsFile Dictionary word file (empty for randnom text)

공개 메소드들

메소드 설명
CreateImage ( )
GetDictionaryCaptchaText ( boolean $extended = false ) : string Random dictionary word generation
__construct ( $config = [] )

보호된 메소드들

메소드 설명
Cleanup ( ) Cleanup
GetCaptchaText ( ) : string Text generation
GetRandomCaptchaText ( $length = null ) : string Random text generation
ImageAllocate ( ) Creates the image resources
ReduceImage ( ) Reduce the image to the final size
WaveImage ( ) Wave filter
WriteImage ( ) File generation
WriteText ( $text, $fontcfg = [] ) Text insertion

메소드 상세

Cleanup() 보호된 메소드

Cleanup
protected Cleanup ( )

CreateImage() 공개 메소드

public CreateImage ( )

GetCaptchaText() 보호된 메소드

Text generation
protected GetCaptchaText ( ) : string
리턴 string Text

GetDictionaryCaptchaText() 공개 메소드

Random dictionary word generation
public GetDictionaryCaptchaText ( boolean $extended = false ) : string
$extended boolean Add extended "fake" words
리턴 string Word

GetRandomCaptchaText() 보호된 메소드

Random text generation
protected GetRandomCaptchaText ( $length = null ) : string
리턴 string Text

ImageAllocate() 보호된 메소드

Creates the image resources
protected ImageAllocate ( )

ReduceImage() 보호된 메소드

Reduce the image to the final size
protected ReduceImage ( )

WaveImage() 보호된 메소드

Wave filter
protected WaveImage ( )

WriteImage() 보호된 메소드

File generation
protected WriteImage ( )

WriteText() 보호된 메소드

Text insertion
protected WriteText ( $text, $fontcfg = [] )

__construct() 공개 메소드

public __construct ( $config = [] )

프로퍼티 상세

$Xamplitude 공개적으로 프로퍼티

public $Xamplitude

$Xperiod 공개적으로 프로퍼티

public $Xperiod

$Yamplitude 공개적으로 프로퍼티

public $Yamplitude

$Yperiod 공개적으로 프로퍼티

Wave configuracion in X and Y axes
public $Yperiod

$backgroundColor 공개적으로 프로퍼티

Background color in RGB-array
public $backgroundColor

$blur 공개적으로 프로퍼티

Better image results with scale=3
public $blur

$colors 공개적으로 프로퍼티

Foreground colors in RGB-array
public $colors

$debug 공개적으로 프로퍼티

Debug?
public $debug

$fonts 공개적으로 프로퍼티

- font: TTF file - spacing: relative pixel space between character - minSize: min font size - maxSize: max font size
public $fonts

$height 공개적으로 프로퍼티

Height of the image
public $height

$im 공개적으로 프로퍼티

GD image
public $im

$imageFormat 공개적으로 프로퍼티

Image format: jpeg or png
public $imageFormat

$maxRotation 공개적으로 프로퍼티

letter rotation clockwise
public $maxRotation

$maxWordLength 공개적으로 프로퍼티

Used for dictionary words indicating the word-length for font-size modification purposes
public $maxWordLength

$minWordLength 공개적으로 프로퍼티

Min word length (for non-dictionary random text generation)
public $minWordLength

$scale 공개적으로 프로퍼티

Internal image size factor (for better image quality) 1: low, 2: medium, 3: high
public $scale

$session_var 공개적으로 프로퍼티

Sessionname to store the original text
public $session_var

$shadowColor 공개적으로 프로퍼티

Shadow color in RGB-array or false
public $shadowColor

$transprent 공개적으로 프로퍼티

public $transprent

$width 공개적으로 프로퍼티

Width of the image
public $width

$wordsFile 공개적으로 프로퍼티

Dictionary word file (empty for randnom text)
public $wordsFile