PHP Class SmsModel, thinksns

Author: Medz Seven ([email protected])
Inheritance: extends Model
Exibir arquivo Open project: medz/thinksns-4 Class Usage Examples

Protected Properties

Property Type Description
$code integer 验证码代码
$curl object 储存Curl对象的变量
$fields array 数据表保护字段成员
$param string 发送服务器参数
$phone integer 用户发送的手机号码
$provider string 短信平台提供商
$resultCode string 成功返回表示代码
$tableName string 短信记录表
$template string 短信模板
$type string 发送方式 type [auto,post,get] auto标识get+post并存
$url string 短信服务器地址

Public Methods

Method Description
CheckCaptcha ( float $phone, integer $code ) : boolean 校验验证码是否正确
__construct ( $name = '' ) 构造方法 - 获取短信数据配置
__destruct ( ) 析构方法 - 主要关闭curl
checkEmailCaptcha ( string $email, integer $code ) : boolean 验证邮箱验证码正确性
getCode ( ) : integer 获取验证码
getMessage ( ) : string 获取消息
getService ( ) : array 获取平台配置
sendCaptcha ( integer $phone, boolean $sendLock = false ) : boolean 发送验证码
sendEmaillCaptcha ( string $email, boolean $sendLock = false ) : boolean 发送验证码到邮箱
sendMessage ( integer $phone, string $message, boolean $sendLock = false ) : boolean 发送短息消息
smsbao ( string $data ) : boolean 短信宝 www.smsbao.com

Protected Methods

Method Description
InLock ( integer $time = null ) 时间加锁
allBefore ( ) : boolean 所以方法方法前置方法
auto ( string $data ) : boolean 自适应校验发送是否成功
buildParam ( ) undocumented function
curl ( ) : string 发送数据
ihuyi ( string $data ) : boolean 互亿无线平台校验
lock ( ) : boolean 时间锁,检查是否不可以发送
send ( ) : boolean 发送
setMessage ( string $message ) 设置消息

Method Details

CheckCaptcha() public method

校验验证码是否正确
Author: Medz Seven ([email protected])
public CheckCaptcha ( float $phone, integer $code ) : boolean
$phone float 手机号码
$code integer 验证码
return boolean

InLock() protected method

时间加锁
Author: Medz Seven ([email protected])
protected InLock ( integer $time = null )
$time integer 加锁的时间

__construct() final public method

构造方法 - 获取短信数据配置
Author: Medz Seven ([email protected])
final public __construct ( $name = '' )

__destruct() final public method

析构方法 - 主要关闭curl
Author: Medz Seven ([email protected])
final public __destruct ( )

allBefore() protected method

所以方法方法前置方法
Author: Medz Seven ([email protected])
protected allBefore ( ) : boolean
return boolean

auto() protected method

自适应校验发送是否成功
Author: Medz Seven ([email protected])
protected auto ( string $data ) : boolean
$data string 数据;
return boolean

buildParam() protected method

undocumented function
Author:
protected buildParam ( )

checkEmailCaptcha() public method

验证邮箱验证码正确性
Author: Medz Seven ([email protected])
public checkEmailCaptcha ( string $email, integer $code ) : boolean
$email string 邮箱地址
$code integer 验证码
return boolean

curl() protected method

发送数据
Author: Medz Seven ([email protected])
protected curl ( ) : string
return string

getCode() public method

获取验证码
Author: Medz Seven ([email protected])
public getCode ( ) : integer
return integer

getMessage() public method

获取消息
Author: Medz Seven ([email protected])
public getMessage ( ) : string
return string

getService() public method

获取平台配置
Author: Seven Du ([email protected])
public getService ( ) : array
return array

ihuyi() protected method

互亿无线平台校验
Author: Medz Seven ([email protected])
protected ihuyi ( string $data ) : boolean
$data string 数据
return boolean

lock() protected method

时间锁,检查是否不可以发送
Author: Medz Seven ([email protected])
protected lock ( ) : boolean
return boolean

send() protected method

发送
Author: Medz Seven ([email protected])
protected send ( ) : boolean
return boolean

sendCaptcha() public method

发送验证码
Author: Medz Seven ([email protected])
public sendCaptcha ( integer $phone, boolean $sendLock = false ) : boolean
$phone integer 要发送到的手机号码
$sendLock boolean 发送锁,默认关闭
return boolean

sendEmaillCaptcha() public method

发送验证码到邮箱
Author: Medz Seven ([email protected])
public sendEmaillCaptcha ( string $email, boolean $sendLock = false ) : boolean
$email string 邮箱地址
$sendLock boolean 是否有时间锁
return boolean

sendMessage() public method

发送短息消息
Author: Medz Seven ([email protected])
public sendMessage ( integer $phone, string $message, boolean $sendLock = false ) : boolean
$phone integer 手机号码
$message string 短信内容
$sendLock boolean 时间锁, 默认关闭
return boolean

setMessage() protected method

设置消息
Author: Medz Seven ([email protected])
protected setMessage ( string $message )
$message string 消息

smsbao() public method

短信宝 www.smsbao.com
Author: Seven Du ([email protected])
public smsbao ( string $data ) : boolean
$data string 数据
return boolean

Property Details

$code protected_oe property

验证码代码
protected int $code
return integer

$curl protected_oe property

储存Curl对象的变量
protected object $curl
return object

$fields protected_oe property

数据表保护字段成员
protected array $fields
return array

$param protected_oe property

发送服务器参数
protected string $param
return string

$phone protected_oe property

用户发送的手机号码
protected int $phone
return integer

$provider protected_oe property

短信平台提供商
protected string $provider
return string

$resultCode protected_oe property

成功返回表示代码
protected string $resultCode
return string

$tableName protected_oe property

短信记录表
protected string $tableName
return string

$template protected_oe property

短信模板
protected string $template
return string

$type protected_oe property

发送方式 type [auto,post,get] auto标识get+post并存
protected string $type
return string

$url protected_oe property

短信服务器地址
protected string $url
return string