ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilSecurImage Class Reference

SecurImage Wrapper (very simply wrapper, does not abstract other captchas) More...

+ Collaboration diagram for ilSecurImage:

Public Member Functions

 __construct ()
 Constructor. More...
 
 getSecureImageObject ()
 
 check ($a_input)
 
 showImage ()
 
 setImageHeight ($image_height)
 
 getImageHeight ()
 
 setImageWidth ($image_width)
 
 getImageWidth ()
 

Data Fields

const MAX_CAPTCHA_IMG_WIDTH = 430
 
const MAX_CAPTCHA_IMG_HEIGHT = 160
 

Protected Attributes

 $image_width = 0
 
 $image_height = 0
 
 $securimage
 

Static Protected Attributes

static $supported_audio_languages
 

Detailed Description

SecurImage Wrapper (very simply wrapper, does not abstract other captchas)

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 13 of file class.ilSecurImage.php.

Constructor & Destructor Documentation

◆ __construct()

ilSecurImage::__construct ( )

Constructor.

Definition at line 50 of file class.ilSecurImage.php.

References ilSecurImageUtil\includeSecurImage().

51  {
53  $this->securimage = new Securimage();
54  if(!function_exists("imagettftext"))
55  {
56  $this->securimage->use_gd_font = true;
57  }
58 
59  $this->securimage->num_lines = 3;
60  }
Project: Securimage: A PHP class for creating and managing form CAPTCHA images File: securimage...
+ Here is the call graph for this function:

Member Function Documentation

◆ check()

ilSecurImage::check (   $a_input)
Parameters
$a_input
Returns
bool

Definition at line 74 of file class.ilSecurImage.php.

75  {
76  return $this->securimage->check($a_input);
77  }

◆ getImageHeight()

ilSecurImage::getImageHeight ( )
Returns
int

Definition at line 125 of file class.ilSecurImage.php.

References $image_height.

126  {
127  return $this->image_height;
128  }

◆ getImageWidth()

ilSecurImage::getImageWidth ( )
Returns
int

Definition at line 146 of file class.ilSecurImage.php.

References $image_width.

147  {
148  return $this->image_width;
149  }

◆ getSecureImageObject()

ilSecurImage::getSecureImageObject ( )
Returns
Securimage

Definition at line 65 of file class.ilSecurImage.php.

References $securimage.

66  {
67  return $this->securimage;
68  }

◆ setImageHeight()

ilSecurImage::setImageHeight (   $image_height)
Parameters
int$image_height
Exceptions
InvalidArgumentException

Definition at line 113 of file class.ilSecurImage.php.

References $image_height.

114  {
115  if(!is_numeric($image_height) || $image_height > self::MAX_CAPTCHA_IMG_HEIGHT)
116  {
117  throw new InvalidArgumentException('Please provide a valid image height (numeric value > 0 and <= ' . self::MAX_CAPTCHA_IMG_HEIGHT);
118  }
119  $this->image_height = $image_height;
120  }

◆ setImageWidth()

ilSecurImage::setImageWidth (   $image_width)
Parameters
int$image_width
Exceptions
InvalidArgumentException

Definition at line 134 of file class.ilSecurImage.php.

References $image_width.

135  {
136  if(!is_numeric($image_width) || $image_width > self::MAX_CAPTCHA_IMG_WIDTH)
137  {
138  throw new InvalidArgumentException('Please provide a valid image width (numeric value > 0 and <= ' . self::MAX_CAPTCHA_IMG_WIDTH);
139  }
140  $this->image_width = $image_width;
141  }

◆ showImage()

ilSecurImage::showImage ( )

Definition at line 82 of file class.ilSecurImage.php.

References $lng, and ilSecurImageUtil\getDirectory().

83  {
85  $this->securimage->show();
86  }
+ Here is the call graph for this function:

Field Documentation

◆ $image_height

ilSecurImage::$image_height = 0
protected

Definition at line 33 of file class.ilSecurImage.php.

Referenced by getImageHeight(), and setImageHeight().

◆ $image_width

ilSecurImage::$image_width = 0
protected

Definition at line 28 of file class.ilSecurImage.php.

Referenced by getImageWidth(), and setImageWidth().

◆ $securimage

ilSecurImage::$securimage
protected

Definition at line 38 of file class.ilSecurImage.php.

Referenced by getSecureImageObject().

◆ $supported_audio_languages

ilSecurImage::$supported_audio_languages
staticprotected
Initial value:
'fr', 'de'
)

Definition at line 43 of file class.ilSecurImage.php.

◆ MAX_CAPTCHA_IMG_HEIGHT

const ilSecurImage::MAX_CAPTCHA_IMG_HEIGHT = 160

Definition at line 23 of file class.ilSecurImage.php.

◆ MAX_CAPTCHA_IMG_WIDTH

const ilSecurImage::MAX_CAPTCHA_IMG_WIDTH = 430

Definition at line 18 of file class.ilSecurImage.php.


The documentation for this class was generated from the following file: