PHP Class Redaxscript\Captcha

Since: 2.0.0
Author: Henry Ruhs
Show file Open project: redaxmedia/redaxscript Class Usage Examples

Protected Properties

Property Type Description
$_language object instance of the language class
$_mode integer captcha operator mode
$_operatorArray array array of mathematical operators used for the task
$_rangeArray array allowed range for the task
$_solution integer solution to the task
$_task string task to be solved

Public Methods

Method Description
__construct ( Language $language ) constructor of the class
getMax ( ) : integer get the maximum range
getMin ( ) : integer get the minimum range
getSolution ( ) : integer get the solution
getTask ( ) : string get the task
init ( integer $mode = null ) init the class

Protected Methods

Method Description
_create ( ) create a task of two numbers between allowable range
_getOperator ( ) : integer get the mathematical operator used for the task

Method Details

__construct() public method

constructor of the class
Since: 2.4.0
public __construct ( Language $language )
$language Language instance of the language class

_create() protected method

create a task of two numbers between allowable range
Since: 2.0.0
protected _create ( )

_getOperator() protected method

get the mathematical operator used for the task
Since: 2.0.0
protected _getOperator ( ) : integer
return integer

getMax() public method

get the maximum range
Since: 2.6.0
public getMax ( ) : integer
return integer

getMin() public method

get the minimum range
Since: 2.6.0
public getMin ( ) : integer
return integer

getSolution() public method

get the solution
Since: 2.6.0
public getSolution ( ) : integer
return integer

getTask() public method

get the task
Since: 2.0.0
public getTask ( ) : string
return string

init() public method

init the class
Since: 2.4.0
public init ( integer $mode = null )
$mode integer captcha operator mode

Property Details

$_language protected property

instance of the language class
protected object $_language
return object

$_mode protected property

captcha operator mode
protected int $_mode
return integer

$_operatorArray protected property

array of mathematical operators used for the task
protected array $_operatorArray
return array

$_rangeArray protected property

allowed range for the task
protected array $_rangeArray
return array

$_solution protected property

solution to the task
protected int $_solution
return integer

$_task protected property

task to be solved
protected string $_task
return string