PHP 클래스 Pop\Image\Captcha

저자: Nick Sagona, III ([email protected])
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$border mixed CAPTCHA border width
$colors integer CAPTCHA colors
$expire integer CAPTCHA token expiration in seconds
$font string CAPTCHA font
$grid integer CAPTCHA grid spacing
$image mixed CAPTCHA image resource
$length integer CAPTCHA string length
$rotate integer CAPTCHA rotate
$size integer CAPTCHA font size (if using system fonts, it will be capped at 5)
$swirl integer CAPTCHA swirl
$token array CAPTCHA token object
$x integer CAPTCHA x
$y integer CAPTCHA y

공개 메소드들

메소드 설명
__construct ( array $options, boolean $forceGd = false ) : Captcha Constructor
factory ( array $options, boolean $forceGd = false ) : Captcha Static method to instantiate the CAPTCHA image object and return itself to facilitate chaining methods together.
generateToken ( ) : void Method to generate the token object
getBackgroundColor ( ) : array Method to get the background color
getBorderColor ( ) : array Method to get the border color
getBorderWidth ( ) : mixed Method to get the border width
getExpire ( ) : integer Method to get the expiration length in seconds
getFont ( ) : string Method to get the font
getGridColor ( ) : array Method to get the grid color
getGridWidth ( ) : integer Method to get the grid spacing
getLength ( ) : integer Method to get the string length
getRotate ( ) : integer Method to get the rotation
getSize ( ) : integer Method to get the font size
getSwirl ( ) : integer Method to get the swirl
getTextColor ( ) : array Method to get the text color
getToken ( ) : array Method to get the token object, generating a new one if necessary
getX ( ) : integer Method to get the X position
getY ( ) : integer Method to get the Y position
image ( ) : mixed Method to get the image object
output ( ) : void Method to output the image object
setBackgroundColor ( integer $r, integer $g, integer $b ) : Captcha Method to set the background color
setBorderColor ( integer $r = null, integer $g = null, integer $b = null ) : Captcha Method to set the border color
setBorderWidth ( mixed $border = 0.55 ) : Captcha Method to set the border width
setExpire ( integer $expire = 300 ) : Captcha Method to set the expiration length in seconds
setFont ( string $font = null ) : Captcha Method to set the font
setGridColor ( integer $r = null, integer $g = null, integer $b = null ) : Captcha Method to set the grid color
setGridWidth ( integer $grid = 5 ) : Captcha Method to set the grid spacing
setLength ( integer $length = 4 ) : Captcha Method to set the string length
setRotate ( integer $rotate = null ) : Captcha Method to set the rotation
setSize ( integer $size = 20 ) : Captcha Method to set the font size
setSwirl ( integer $swirl = null ) : Captcha Method to set the swirl
setTextColor ( integer $r, integer $g, integer $b ) : Captcha Method to set the text color
setX ( integer $x = null ) : Captcha Method to set the X position
setXY ( integer $x = null, integer $y = null ) : Captcha Method to set the X, Y position
setY ( integer $y = null ) : Captcha Method to set the Y position

메소드 상세

__construct() 공개 메소드

Instantiate a CAPTCHA image object. Valid options are: $options = array( 'width' => 75, 'height' => 25, 'background' => array(200, 200, 200) // R, G, B values for the background color ); $options = array( 'image' => 'some-image-background,gif' ); This $forceGd flag forces the object to use the Gd extension. If both are installed, it will default to Imagick unless this flag is set to true.
public __construct ( array $options, boolean $forceGd = false ) : Captcha
$options array
$forceGd boolean
리턴 Captcha

factory() 공개 정적인 메소드

Static method to instantiate the CAPTCHA image object and return itself to facilitate chaining methods together.
public static factory ( array $options, boolean $forceGd = false ) : Captcha
$options array
$forceGd boolean
리턴 Captcha

generateToken() 공개 메소드

Method to generate the token object
public generateToken ( ) : void
리턴 void

getBackgroundColor() 공개 메소드

Method to get the background color
public getBackgroundColor ( ) : array
리턴 array

getBorderColor() 공개 메소드

Method to get the border color
public getBorderColor ( ) : array
리턴 array

getBorderWidth() 공개 메소드

Method to get the border width
public getBorderWidth ( ) : mixed
리턴 mixed

getExpire() 공개 메소드

Method to get the expiration length in seconds
public getExpire ( ) : integer
리턴 integer

getFont() 공개 메소드

Method to get the font
public getFont ( ) : string
리턴 string

getGridColor() 공개 메소드

Method to get the grid color
public getGridColor ( ) : array
리턴 array

getGridWidth() 공개 메소드

Method to get the grid spacing
public getGridWidth ( ) : integer
리턴 integer

getLength() 공개 메소드

Method to get the string length
public getLength ( ) : integer
리턴 integer

getRotate() 공개 메소드

Method to get the rotation
public getRotate ( ) : integer
리턴 integer

getSize() 공개 메소드

Method to get the font size
public getSize ( ) : integer
리턴 integer

getSwirl() 공개 메소드

Method to get the swirl
public getSwirl ( ) : integer
리턴 integer

getTextColor() 공개 메소드

Method to get the text color
public getTextColor ( ) : array
리턴 array

getToken() 공개 메소드

Method to get the token object, generating a new one if necessary
public getToken ( ) : array
리턴 array

getX() 공개 메소드

Method to get the X position
public getX ( ) : integer
리턴 integer

getY() 공개 메소드

Method to get the Y position
public getY ( ) : integer
리턴 integer

image() 공개 메소드

Method to get the image object
public image ( ) : mixed
리턴 mixed

output() 공개 메소드

Method to output the image object
public output ( ) : void
리턴 void

setBackgroundColor() 공개 메소드

Method to set the background color
public setBackgroundColor ( integer $r, integer $g, integer $b ) : Captcha
$r integer
$g integer
$b integer
리턴 Captcha

setBorderColor() 공개 메소드

Method to set the border color
public setBorderColor ( integer $r = null, integer $g = null, integer $b = null ) : Captcha
$r integer
$g integer
$b integer
리턴 Captcha

setBorderWidth() 공개 메소드

Method to set the border width
public setBorderWidth ( mixed $border = 0.55 ) : Captcha
$border mixed
리턴 Captcha

setExpire() 공개 메소드

Method to set the expiration length in seconds
public setExpire ( integer $expire = 300 ) : Captcha
$expire integer
리턴 Captcha

setFont() 공개 메소드

Method to set the font
public setFont ( string $font = null ) : Captcha
$font string
리턴 Captcha

setGridColor() 공개 메소드

Method to set the grid color
public setGridColor ( integer $r = null, integer $g = null, integer $b = null ) : Captcha
$r integer
$g integer
$b integer
리턴 Captcha

setGridWidth() 공개 메소드

Method to set the grid spacing
public setGridWidth ( integer $grid = 5 ) : Captcha
$grid integer
리턴 Captcha

setLength() 공개 메소드

Method to set the string length
public setLength ( integer $length = 4 ) : Captcha
$length integer
리턴 Captcha

setRotate() 공개 메소드

Method to set the rotation
public setRotate ( integer $rotate = null ) : Captcha
$rotate integer
리턴 Captcha

setSize() 공개 메소드

Method to set the font size
public setSize ( integer $size = 20 ) : Captcha
$size integer
리턴 Captcha

setSwirl() 공개 메소드

Method to set the swirl
public setSwirl ( integer $swirl = null ) : Captcha
$swirl integer
리턴 Captcha

setTextColor() 공개 메소드

Method to set the text color
public setTextColor ( integer $r, integer $g, integer $b ) : Captcha
$r integer
$g integer
$b integer
리턴 Captcha

setX() 공개 메소드

Method to set the X position
public setX ( integer $x = null ) : Captcha
$x integer
리턴 Captcha

setXY() 공개 메소드

Method to set the X, Y position
public setXY ( integer $x = null, integer $y = null ) : Captcha
$x integer
$y integer
리턴 Captcha

setY() 공개 메소드

Method to set the Y position
public setY ( integer $y = null ) : Captcha
$y integer
리턴 Captcha

프로퍼티 상세

$border 보호되어 있는 프로퍼티

CAPTCHA border width
protected mixed $border
리턴 mixed

$colors 보호되어 있는 프로퍼티

CAPTCHA colors
protected int $colors
리턴 integer

$expire 보호되어 있는 프로퍼티

CAPTCHA token expiration in seconds
protected int $expire
리턴 integer

$font 보호되어 있는 프로퍼티

CAPTCHA font
protected string $font
리턴 string

$grid 보호되어 있는 프로퍼티

CAPTCHA grid spacing
protected int $grid
리턴 integer

$image 보호되어 있는 프로퍼티

CAPTCHA image resource
protected mixed $image
리턴 mixed

$length 보호되어 있는 프로퍼티

CAPTCHA string length
protected int $length
리턴 integer

$rotate 보호되어 있는 프로퍼티

CAPTCHA rotate
protected int $rotate
리턴 integer

$size 보호되어 있는 프로퍼티

CAPTCHA font size (if using system fonts, it will be capped at 5)
protected int $size
리턴 integer

$swirl 보호되어 있는 프로퍼티

CAPTCHA swirl
protected int $swirl
리턴 integer

$token 보호되어 있는 프로퍼티

CAPTCHA token object
protected array $token
리턴 array

$x 보호되어 있는 프로퍼티

CAPTCHA x
protected int $x
리턴 integer

$y 보호되어 있는 프로퍼티

CAPTCHA y
protected int $y
리턴 integer