ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSecurImage Class Reference

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

+ Collaboration diagram for ilSecurImage:

Public Member Functions

 __construct ()
 Constructor.
 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

ilSecurImage::__construct ( )

Constructor.

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

References ilSecurImageUtil\includeSecurImage().

{
$this->securimage = new Securimage();
if(!function_exists("imagettftext"))
{
$this->securimage->use_gd_font = true;
}
$this->securimage->num_lines = 3;
}

+ Here is the call graph for this function:

Member Function Documentation

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

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

{
return $this->securimage->check($a_input);
}
ilSecurImage::getImageHeight ( )
Returns
int

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

References $image_height.

{
}
ilSecurImage::getImageWidth ( )
Returns
int

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

References $image_width.

{
}
ilSecurImage::getSecureImageObject ( )
Returns
Securimage

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

References $securimage.

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

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

References $image_height.

{
if(!is_numeric($image_height) || $image_height > self::MAX_CAPTCHA_IMG_HEIGHT)
{
throw new InvalidArgumentException('Please provide a valid image height (numeric value > 0 and <= ' . self::MAX_CAPTCHA_IMG_HEIGHT);
}
$this->image_height = $image_height;
}
ilSecurImage::setImageWidth (   $image_width)
Parameters
int$image_width
Exceptions
InvalidArgumentException

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

References $image_width.

{
if(!is_numeric($image_width) || $image_width > self::MAX_CAPTCHA_IMG_WIDTH)
{
throw new InvalidArgumentException('Please provide a valid image width (numeric value > 0 and <= ' . self::MAX_CAPTCHA_IMG_WIDTH);
}
$this->image_width = $image_width;
}
ilSecurImage::showImage ( )

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

References ilSecurImageUtil\getDirectory().

{
$this->securimage->show();
}

+ Here is the call graph for this function:

Field Documentation

ilSecurImage::$image_height = 0
protected

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

Referenced by getImageHeight(), and setImageHeight().

ilSecurImage::$image_width = 0
protected

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

Referenced by getImageWidth(), and setImageWidth().

ilSecurImage::$securimage
protected

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

Referenced by getSecureImageObject().

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

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

const ilSecurImage::MAX_CAPTCHA_IMG_HEIGHT = 160

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

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: