Properties

$url

$url : string

CAPTCHA URL

Type

string

$answer

$answer : string

CAPTCHA answer length

Type

string

$length

$length : string

CAPTCHA length

Type

string

$uppercase

$uppercase : boolean

CAPTCHA uppercase flag

Type

boolean

$expire

$expire : integer

CAPTCHA expiration

Type

integer

$reload

$reload : string

CAPTCHA reload text

Type

string

$token

$token : array

Current token data

Type

array

$config

$config : array

CAPTCHA image config

Type

array

Methods

__construct()

__construct(string  $url, integer  $expire = 300, array  $config = null) 

Constructor

Instantiate the captcha image object

Parameters

string $url
integer $expire
array $config

setUrl()

setUrl(string  $url) : \Pop\Image\Captcha

Set CAPTCHA URL

Parameters

string $url

Returns

\Pop\Image\Captcha

setExpire()

setExpire(integer  $expire) : \Pop\Image\Captcha

Set CAPTCHA expiration

Parameters

integer $expire

Returns

\Pop\Image\Captcha

setAnswer()

setAnswer(string  $answer) : \Pop\Image\Captcha

Set CAPTCHA answer

Parameters

string $answer

Returns

\Pop\Image\Captcha

setLength()

setLength(integer  $length) : \Pop\Image\Captcha

Set CAPTCHA answer length

Parameters

integer $length

Returns

\Pop\Image\Captcha

setUppercase()

setUppercase(boolean  $uppercase) : \Pop\Image\Captcha

Set CAPTCHA answer case

Parameters

boolean $uppercase

Returns

\Pop\Image\Captcha

setReload()

setReload(string  $reload) : \Pop\Image\Captcha

Set CAPTCHA reload text

Parameters

string $reload

Returns

\Pop\Image\Captcha

setConfig()

setConfig(array  $config) : \Pop\Image\Captcha

Set CAPTCHA image config

Parameters

array $config

Returns

\Pop\Image\Captcha

getUrl()

getUrl() : string

Get CAPTCHA URL

Returns

string

getExpire()

getExpire() : integer

Get CAPTCHA expiration

Returns

integer

getAnswer()

getAnswer() : string

Get CAPTCHA answer

Returns

string

getLength()

getLength() : integer

Get CAPTCHA answer length

Returns

integer

isUppercase()

isUppercase() : boolean

Get CAPTCHA answer case

Returns

boolean

getReload()

getReload() : string

Get CAPTCHA reload text

Returns

string

getConfig()

getConfig() : array

Get CAPTCHA image config

Returns

array

getImageHtml()

getImageHtml() : string

Get CAPTCHA image HTML

Returns

string

getToken()

getToken() : array

Get CAPTCHA token

Returns

array

createNewToken()

createNewToken() : \Pop\Image\Captcha

Create CAPTCHA token

Returns

\Pop\Image\Captcha

createImage()

createImage() : \Pop\Image\Captcha

Create CAPTCHA image

Returns

\Pop\Image\Captcha

random()

random(integer  $length = 8, boolean  $case = false) : string

Create random alphanumeric string

Parameters

integer $length
boolean $case

Returns

string

__toString()

__toString() : string

Print out the image

Returns

string