PHP 클래스 daixianceng\smser\Smser

저자: Cosmo ([email protected])
상속: extends yii\base\Component
파일 보기 프로젝트 열기: daixianceng/yii2-smser 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$fileMode boolean 是否启用文件模式
$url string 请求地址
$username string 用户名

보호된 프로퍼티들

프로퍼티 타입 설명
$message string 状态信息
$password string 密码
$state string 状态码

공개 메소드들

메소드 설명
getMessage ( ) : string 获取状态信息
getState ( ) : string 获取状态码
send ( string $mobile, string $content ) : boolean 发送短信
sendByTemplate ( string $mobile, mixed $data, number $id ) : boolean 发送模板短信
setPassword ( string $password ) 设置密码
setUseFileTransport ( boolean $value ) Whether to use file mode.

비공개 메소드들

메소드 설명
_sendAsFile ( string $mobile, string $content ) : boolean 用于存储短信内容

메소드 상세

getMessage() 공개 메소드

获取状态信息
public getMessage ( ) : string
리턴 string

getState() 공개 메소드

获取状态码
public getState ( ) : string
리턴 string

send() 공개 메소드

发送短信
public send ( string $mobile, string $content ) : boolean
$mobile string 对方手机号码
$content string 短信内容
리턴 boolean 短信是否发送成功

sendByTemplate() 공개 메소드

发送模板短信
public sendByTemplate ( string $mobile, mixed $data, number $id ) : boolean
$mobile string 对方手机号码
$data mixed 键值对
$id number 模板id
리턴 boolean 短信是否发送成功

setPassword() 공개 메소드

设置密码
public setPassword ( string $password )
$password string

setUseFileTransport() 공개 메소드

Whether to use file mode.
public setUseFileTransport ( boolean $value )
$value boolean

프로퍼티 상세

$fileMode 공개적으로 프로퍼티

是否启用文件模式
public bool $fileMode
리턴 boolean

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

状态信息
protected string $message
리턴 string

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

密码
protected string $password
리턴 string

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

状态码
protected string $state
리턴 string

$url 공개적으로 프로퍼티

请求地址
public string $url
리턴 string

$username 공개적으로 프로퍼티

用户名
public string $username
리턴 string