PHP Class Toplan\PhpSms\Agent

Afficher le fichier Open project: toplan/phpsms

Protected Properties

Свойство Type Description
$config array The configuration information of agent.
$result array The result data.

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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

__get() public méthode

Overload object properties.
public __get ( $name ) : mixed
$name
Résultat mixed

__isset() public méthode

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

config() public méthode

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
Résultat mixed

curl() public static méthode

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

result() public méthode

Set/get result data.
public result ( $name = null, $value = null ) : mixed
$name
$value
Résultat mixed

sendContentSms() abstract public méthode

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

sendSms() abstract public méthode

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

sendTemplateSms() abstract public méthode

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

sockPost() public static méthode

Http post request.
public static sockPost ( $url, array $query, $port = 80 ) : mixed
$url
$query array
$port
Résultat mixed

voiceVerify() abstract public méthode

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

Property Details

$config protected_oe property

The configuration information of agent.
protected array $config
Résultat array

$result protected_oe property

The result data.
protected array $result
Résultat array