PHP 클래스 SmsModel, thinksns

저자: Medz Seven ([email protected])
상속: extends Model
파일 보기 프로젝트 열기: medz/thinksns-4 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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 短信服务器地址

공개 메소드들

메소드 설명
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

보호된 메소드들

메소드 설명
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 ) 设置消息

메소드 상세

CheckCaptcha() 공개 메소드

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

InLock() 보호된 메소드

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

__construct() 최종 공개 메소드

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

__destruct() 최종 공개 메소드

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

allBefore() 보호된 메소드

所以方法方法前置方法
저자: Medz Seven ([email protected])
protected allBefore ( ) : boolean
리턴 boolean

auto() 보호된 메소드

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

buildParam() 보호된 메소드

undocumented function
저자:
protected buildParam ( )

checkEmailCaptcha() 공개 메소드

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

curl() 보호된 메소드

发送数据
저자: Medz Seven ([email protected])
protected curl ( ) : string
리턴 string

getCode() 공개 메소드

获取验证码
저자: Medz Seven ([email protected])
public getCode ( ) : integer
리턴 integer

getMessage() 공개 메소드

获取消息
저자: Medz Seven ([email protected])
public getMessage ( ) : string
리턴 string

getService() 공개 메소드

获取平台配置
저자: Seven Du ([email protected])
public getService ( ) : array
리턴 array

ihuyi() 보호된 메소드

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

lock() 보호된 메소드

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

send() 보호된 메소드

发送
저자: Medz Seven ([email protected])
protected send ( ) : boolean
리턴 boolean

sendCaptcha() 공개 메소드

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

sendEmaillCaptcha() 공개 메소드

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

sendMessage() 공개 메소드

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

setMessage() 보호된 메소드

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

smsbao() 공개 메소드

短信宝 www.smsbao.com
저자: Seven Du ([email protected])
public smsbao ( string $data ) : boolean
$data string 数据
리턴 boolean

프로퍼티 상세

$code 보호되어 있는 프로퍼티

验证码代码
protected int $code
리턴 integer

$curl 보호되어 있는 프로퍼티

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

$fields 보호되어 있는 프로퍼티

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

$param 보호되어 있는 프로퍼티

发送服务器参数
protected string $param
리턴 string

$phone 보호되어 있는 프로퍼티

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

$provider 보호되어 있는 프로퍼티

短信平台提供商
protected string $provider
리턴 string

$resultCode 보호되어 있는 프로퍼티

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

$tableName 보호되어 있는 프로퍼티

短信记录表
protected string $tableName
리턴 string

$template 보호되어 있는 프로퍼티

短信模板
protected string $template
리턴 string

$type 보호되어 있는 프로퍼티

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

$url 보호되어 있는 프로퍼티

短信服务器地址
protected string $url
리턴 string