FLEA_Helper_ImgCode类参考

所有成员的列表。

公有成员

 FLEA_Helper_ImgCode ()
 check ($code)
 checkCaseSensitive ($code)
 clear ()
 image ($type=0, $length=4, $lefttime=900, $options=null)
 _hex2rgb ($color, $defualt= 'ffffff')

公有属性

 $_code
 $_expired
 $imagetype = 'jpeg'
 $keepCode = false


详细描述

在文件ImgCode.php53行定义。


成员函数文档

FLEA_Helper_ImgCode::FLEA_Helper_ImgCode (  ) 

构造函数

在文件ImgCode.php89行定义。

FLEA_Helper_ImgCode::check ( code  ) 

检查图像验证码是否有效

参数:
string $code
返回:
boolean

在文件ImgCode.php106行定义。

FLEA_Helper_ImgCode::checkCaseSensitive ( code  ) 

检查图像验证码是否有效(区分大小写)

参数:
string $code
返回:
boolean

在文件ImgCode.php122行定义。

FLEA_Helper_ImgCode::clear (  ) 

清除 session 中的 imgcode 相关信息

在文件ImgCode.php134行定义。

FLEA_Helper_ImgCode::image ( type = 0,
length = 4,
lefttime = 900,
options = null 
)

利用 GD 库产生验证码图像

目前 $options 参数支持下列选项:

如果 font 为 0-5,则使用 GD 库内置的字体。 如果要指定字体文件,则 font 选项必须为字体文件的绝对路径,例如: $options = array('font' => '/var/www/example/myfont.gdf'); image($type, $length, $lefttime, $options);

参数:
int $type 验证码包含的字符类型,0 - 数字、1 - 字母、其他值 - 数字和字母
int $length 验证码长度
int $leftime 验证码有效时间(秒)
array $options 附加选项,可以指定字体、宽度和高度等参数

在文件ImgCode.php160行定义。

参考 _hex2rgb().

FLEA_Helper_ImgCode::_hex2rgb ( color,
defualt = 'ffffff' 
)

将 16 进制颜色值转换为 rgb 值

参数:
string $hex
返回:
array

在文件ImgCode.php270行定义。

参考自 image().


成员数据文档

FLEA_Helper_ImgCode::$_code

在文件ImgCode.php60行定义。

FLEA_Helper_ImgCode::$_expired

在文件ImgCode.php67行定义。

FLEA_Helper_ImgCode::$imagetype = 'jpeg'

在文件ImgCode.php74行定义。

FLEA_Helper_ImgCode::$keepCode = false

在文件ImgCode.php84行定义。


该类的文档由以下文件生成:
Generated at Sat Feb 2 15:18:58 2008 for FleaPHP by  doxygen 1.5.3