PHP 클래스 Toplan\PhpSms\Agent

파일 보기 프로젝트 열기: toplan/phpsms

보호된 프로퍼티들

프로퍼티 타입 설명
$config array The configuration information of agent.
$result array The result data.

공개 메소드들

메소드 설명
__construct ( array $config = [] ) Constructor.
__get ( $name ) : mixed Overload object properties.
__isset ( $name ) : boolean When using isset() or empty() on inaccessible object properties, the __isset() overloading method will be called.
config ( mixed $key = null, mixed $value = null, boolean $override = false ) : mixed Get or set the configuration information of agent.
curl ( string $url, array $params = [], integer | boolean $isPost = false ) : array cURl
result ( $name = null, $value = null ) : mixed Set/get result data.
sendContentSms ( $to, $content ) Content SMS send process.
sendSms ( $to, $content, $tempId, array $tempData ) SMS send process.
sendTemplateSms ( $to, $tempId, array $tempData ) Template SMS send process.
sockPost ( $url, array $query, $port = 80 ) : mixed Http post request.
voiceVerify ( $to, $code, $tempId, array $tempData ) Voice verify send process.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $config = [] )
$config array

__get() 공개 메소드

Overload object properties.
public __get ( $name ) : mixed
$name
리턴 mixed

__isset() 공개 메소드

When using isset() or empty() on inaccessible object properties, the __isset() overloading method will be called.
public __isset ( $name ) : boolean
$name
리턴 boolean

config() 공개 메소드

Get or set the configuration information of agent.
public config ( mixed $key = null, mixed $value = null, boolean $override = false ) : mixed
$key mixed
$value mixed
$override boolean
리턴 mixed

curl() 공개 정적인 메소드

cURl
public static curl ( string $url, array $params = [], integer | boolean $isPost = false ) : array
$url string [请求的URL地址]
$params array [请求的参数]
$isPost integer | boolean [是否采用POST形式]
리턴 array ['request', 'response'] request:是否请求成功 response:响应数据

result() 공개 메소드

Set/get result data.
public result ( $name = null, $value = null ) : mixed
$name
$value
리턴 mixed

sendContentSms() 추상적인 공개 메소드

Content SMS send process.
abstract public sendContentSms ( $to, $content )
$to
$content

sendSms() 추상적인 공개 메소드

SMS send process.
abstract public sendSms ( $to, $content, $tempId, array $tempData )
$to
$content
$tempId
$tempData array

sendTemplateSms() 추상적인 공개 메소드

Template SMS send process.
abstract public sendTemplateSms ( $to, $tempId, array $tempData )
$to
$tempId
$tempData array

sockPost() 공개 정적인 메소드

Http post request.
public static sockPost ( $url, array $query, $port = 80 ) : mixed
$url
$query array
$port
리턴 mixed

voiceVerify() 추상적인 공개 메소드

Voice verify send process.
abstract public voiceVerify ( $to, $code, $tempId, array $tempData )
$to
$code
$tempId
$tempData array

프로퍼티 상세

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

The configuration information of agent.
protected array $config
리턴 array

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

The result data.
protected array $result
리턴 array