id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
208,000
walkor/Workerman
Worker.php
Worker.getStartFilesForWindows
public static function getStartFilesForWindows() { global $argv; $files = array(); foreach($argv as $file) { if(is_file($file)) { $files[$file] = $file; } } return $files; }
php
public static function getStartFilesForWindows() { global $argv; $files = array(); foreach($argv as $file) { if(is_file($file)) { $files[$file] = $file; } } return $files; }
[ "public", "static", "function", "getStartFilesForWindows", "(", ")", "{", "global", "$", "argv", ";", "$", "files", "=", "array", "(", ")", ";", "foreach", "(", "$", "argv", "as", "$", "file", ")", "{", "if", "(", "is_file", "(", "$", "file", ")", ...
Get start files for windows. @return array
[ "Get", "start", "files", "for", "windows", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L1370-L1381
208,001
walkor/Workerman
Worker.php
Worker.checkWorkerStatusForWindows
public static function checkWorkerStatusForWindows() { foreach(static::$_processForWindows as $process_data) { $process = $process_data[0]; $start_file = $process_data[1]; $timer_id = $process_data[2]; $status = proc_get_status($process); i...
php
public static function checkWorkerStatusForWindows() { foreach(static::$_processForWindows as $process_data) { $process = $process_data[0]; $start_file = $process_data[1]; $timer_id = $process_data[2]; $status = proc_get_status($process); i...
[ "public", "static", "function", "checkWorkerStatusForWindows", "(", ")", "{", "foreach", "(", "static", "::", "$", "_processForWindows", "as", "$", "process_data", ")", "{", "$", "process", "=", "$", "process_data", "[", "0", "]", ";", "$", "start_file", "="...
check worker status for windows. @return void
[ "check", "worker", "status", "for", "windows", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L1422-L1445
208,002
walkor/Workerman
Worker.php
Worker.setUserAndGroup
public function setUserAndGroup() { // Get uid. $user_info = posix_getpwnam($this->user); if (!$user_info) { static::log("Warning: User {$this->user} not exsits"); return; } $uid = $user_info['uid']; // Get gid. if ($this->group) { ...
php
public function setUserAndGroup() { // Get uid. $user_info = posix_getpwnam($this->user); if (!$user_info) { static::log("Warning: User {$this->user} not exsits"); return; } $uid = $user_info['uid']; // Get gid. if ($this->group) { ...
[ "public", "function", "setUserAndGroup", "(", ")", "{", "// Get uid.", "$", "user_info", "=", "posix_getpwnam", "(", "$", "this", "->", "user", ")", ";", "if", "(", "!", "$", "user_info", ")", "{", "static", "::", "log", "(", "\"Warning: User {$this->user} n...
Set unix user and group for current process. @return void
[ "Set", "unix", "user", "and", "group", "for", "current", "process", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L1515-L1542
208,003
walkor/Workerman
Worker.php
Worker.checkIfChildRunning
public static function checkIfChildRunning() { foreach (static::$_pidMap as $worker_id => $worker_pid_array) { foreach ($worker_pid_array as $pid => $worker_pid) { if (!posix_kill($pid, 0)) { unset(static::$_pidMap[$worker_id][$pid]); } ...
php
public static function checkIfChildRunning() { foreach (static::$_pidMap as $worker_id => $worker_pid_array) { foreach ($worker_pid_array as $pid => $worker_pid) { if (!posix_kill($pid, 0)) { unset(static::$_pidMap[$worker_id][$pid]); } ...
[ "public", "static", "function", "checkIfChildRunning", "(", ")", "{", "foreach", "(", "static", "::", "$", "_pidMap", "as", "$", "worker_id", "=>", "$", "worker_pid_array", ")", "{", "foreach", "(", "$", "worker_pid_array", "as", "$", "pid", "=>", "$", "wo...
check if child processes is really running
[ "check", "if", "child", "processes", "is", "really", "running" ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L1814-L1823
208,004
walkor/Workerman
Worker.php
Worker.safeEcho
public static function safeEcho($msg, $decorated = false) { $stream = static::outputStream(); if (!$stream) { return false; } if (!$decorated) { $line = $white = $green = $end = ''; if (static::$_outputDecorated) { $line = "\033[1A\...
php
public static function safeEcho($msg, $decorated = false) { $stream = static::outputStream(); if (!$stream) { return false; } if (!$decorated) { $line = $white = $green = $end = ''; if (static::$_outputDecorated) { $line = "\033[1A\...
[ "public", "static", "function", "safeEcho", "(", "$", "msg", ",", "$", "decorated", "=", "false", ")", "{", "$", "stream", "=", "static", "::", "outputStream", "(", ")", ";", "if", "(", "!", "$", "stream", ")", "{", "return", "false", ";", "}", "if...
Safe Echo. @param $msg @param bool $decorated @return bool
[ "Safe", "Echo", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L2090-L2112
208,005
walkor/Workerman
Worker.php
Worker.pauseAccept
public function pauseAccept() { if (static::$globalEvent && false === $this->_pauseAccept && $this->_mainSocket) { static::$globalEvent->del($this->_mainSocket, EventInterface::EV_READ); $this->_pauseAccept = true; } }
php
public function pauseAccept() { if (static::$globalEvent && false === $this->_pauseAccept && $this->_mainSocket) { static::$globalEvent->del($this->_mainSocket, EventInterface::EV_READ); $this->_pauseAccept = true; } }
[ "public", "function", "pauseAccept", "(", ")", "{", "if", "(", "static", "::", "$", "globalEvent", "&&", "false", "===", "$", "this", "->", "_pauseAccept", "&&", "$", "this", "->", "_mainSocket", ")", "{", "static", "::", "$", "globalEvent", "->", "del",...
Pause accept new connections. @return void
[ "Pause", "accept", "new", "connections", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L2267-L2273
208,006
walkor/Workerman
Worker.php
Worker.resumeAccept
public function resumeAccept() { // Register a listener to be notified when server socket is ready to read. if (static::$globalEvent && true === $this->_pauseAccept && $this->_mainSocket) { if ($this->transport !== 'udp') { static::$globalEvent->add($this->_mainSocket, Ev...
php
public function resumeAccept() { // Register a listener to be notified when server socket is ready to read. if (static::$globalEvent && true === $this->_pauseAccept && $this->_mainSocket) { if ($this->transport !== 'udp') { static::$globalEvent->add($this->_mainSocket, Ev...
[ "public", "function", "resumeAccept", "(", ")", "{", "// Register a listener to be notified when server socket is ready to read.", "if", "(", "static", "::", "$", "globalEvent", "&&", "true", "===", "$", "this", "->", "_pauseAccept", "&&", "$", "this", "->", "_mainSoc...
Resume accept new connections. @return void
[ "Resume", "accept", "new", "connections", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L2280-L2291
208,007
walkor/Workerman
Worker.php
Worker.acceptConnection
public function acceptConnection($socket) { // Accept a connection on server socket. set_error_handler(function(){}); $new_socket = stream_socket_accept($socket, 0, $remote_address); restore_error_handler(); // Thundering herd. if (!$new_socket) { return;...
php
public function acceptConnection($socket) { // Accept a connection on server socket. set_error_handler(function(){}); $new_socket = stream_socket_accept($socket, 0, $remote_address); restore_error_handler(); // Thundering herd. if (!$new_socket) { return;...
[ "public", "function", "acceptConnection", "(", "$", "socket", ")", "{", "// Accept a connection on server socket.", "set_error_handler", "(", "function", "(", ")", "{", "}", ")", ";", "$", "new_socket", "=", "stream_socket_accept", "(", "$", "socket", ",", "0", ...
Accept a connection. @param resource $socket @return void
[ "Accept", "a", "connection", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L2397-L2433
208,008
walkor/Workerman
Worker.php
Worker.acceptUdpConnection
public function acceptUdpConnection($socket) { set_error_handler(function(){}); $recv_buffer = stream_socket_recvfrom($socket, static::MAX_UDP_PACKAGE_SIZE, 0, $remote_address); restore_error_handler(); if (false === $recv_buffer || empty($remote_address)) { return false;...
php
public function acceptUdpConnection($socket) { set_error_handler(function(){}); $recv_buffer = stream_socket_recvfrom($socket, static::MAX_UDP_PACKAGE_SIZE, 0, $remote_address); restore_error_handler(); if (false === $recv_buffer || empty($remote_address)) { return false;...
[ "public", "function", "acceptUdpConnection", "(", "$", "socket", ")", "{", "set_error_handler", "(", "function", "(", ")", "{", "}", ")", ";", "$", "recv_buffer", "=", "stream_socket_recvfrom", "(", "$", "socket", ",", "static", "::", "MAX_UDP_PACKAGE_SIZE", "...
For udp package. @param resource $socket @return bool
[ "For", "udp", "package", "." ]
13649907f05014fcfffcfccaef01e63ad3339351
https://github.com/walkor/Workerman/blob/13649907f05014fcfffcfccaef01e63ad3339351/Worker.php#L2441-L2489
208,009
overtrue/wechat
src/OfficialAccount/CustomerService/Client.php
Client.create
public function create(string $account, string $nickname) { $params = [ 'kf_account' => $account, 'nickname' => $nickname, ]; return $this->httpPostJson('customservice/kfaccount/add', $params); }
php
public function create(string $account, string $nickname) { $params = [ 'kf_account' => $account, 'nickname' => $nickname, ]; return $this->httpPostJson('customservice/kfaccount/add', $params); }
[ "public", "function", "create", "(", "string", "$", "account", ",", "string", "$", "nickname", ")", "{", "$", "params", "=", "[", "'kf_account'", "=>", "$", "account", ",", "'nickname'", "=>", "$", "nickname", ",", "]", ";", "return", "$", "this", "->"...
Create a staff. @param string $account @param string $nickname @return mixed
[ "Create", "a", "staff", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/CustomerService/Client.php#L51-L59
208,010
overtrue/wechat
src/OfficialAccount/CustomerService/Client.php
Client.update
public function update(string $account, string $nickname) { $params = [ 'kf_account' => $account, 'nickname' => $nickname, ]; return $this->httpPostJson('customservice/kfaccount/update', $params); }
php
public function update(string $account, string $nickname) { $params = [ 'kf_account' => $account, 'nickname' => $nickname, ]; return $this->httpPostJson('customservice/kfaccount/update', $params); }
[ "public", "function", "update", "(", "string", "$", "account", ",", "string", "$", "nickname", ")", "{", "$", "params", "=", "[", "'kf_account'", "=>", "$", "account", ",", "'nickname'", "=>", "$", "nickname", ",", "]", ";", "return", "$", "this", "->"...
Update a staff. @param string $account @param string $nickname @return mixed
[ "Update", "a", "staff", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/CustomerService/Client.php#L69-L77
208,011
overtrue/wechat
src/OfficialAccount/CustomerService/Client.php
Client.invite
public function invite(string $account, string $wechatId) { $params = [ 'kf_account' => $account, 'invite_wx' => $wechatId, ]; return $this->httpPostJson('customservice/kfaccount/inviteworker', $params); }
php
public function invite(string $account, string $wechatId) { $params = [ 'kf_account' => $account, 'invite_wx' => $wechatId, ]; return $this->httpPostJson('customservice/kfaccount/inviteworker', $params); }
[ "public", "function", "invite", "(", "string", "$", "account", ",", "string", "$", "wechatId", ")", "{", "$", "params", "=", "[", "'kf_account'", "=>", "$", "account", ",", "'invite_wx'", "=>", "$", "wechatId", ",", "]", ";", "return", "$", "this", "->...
Invite a staff. @param string $account @param string $wechatId @return mixed
[ "Invite", "a", "staff", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/CustomerService/Client.php#L99-L107
208,012
overtrue/wechat
src/OfficialAccount/CustomerService/Client.php
Client.messages
public function messages($startTime, $endTime, int $msgId = 1, int $number = 10000) { $params = [ 'starttime' => is_numeric($startTime) ? $startTime : strtotime($startTime), 'endtime' => is_numeric($endTime) ? $endTime : strtotime($endTime), 'msgid' => $msgId, ...
php
public function messages($startTime, $endTime, int $msgId = 1, int $number = 10000) { $params = [ 'starttime' => is_numeric($startTime) ? $startTime : strtotime($startTime), 'endtime' => is_numeric($endTime) ? $endTime : strtotime($endTime), 'msgid' => $msgId, ...
[ "public", "function", "messages", "(", "$", "startTime", ",", "$", "endTime", ",", "int", "$", "msgId", "=", "1", ",", "int", "$", "number", "=", "10000", ")", "{", "$", "params", "=", "[", "'starttime'", "=>", "is_numeric", "(", "$", "startTime", ")...
Get messages history. @param int $startTime @param int $endTime @param int $msgId @param int $number @return mixed
[ "Get", "messages", "history", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/CustomerService/Client.php#L190-L200
208,013
overtrue/wechat
src/Payment/Kernel/BaseClient.php
BaseClient.requestRaw
protected function requestRaw($endpoint, array $params = [], $method = 'post', array $options = []) { return $this->request($endpoint, $params, $method, $options, true); }
php
protected function requestRaw($endpoint, array $params = [], $method = 'post', array $options = []) { return $this->request($endpoint, $params, $method, $options, true); }
[ "protected", "function", "requestRaw", "(", "$", "endpoint", ",", "array", "$", "params", "=", "[", "]", ",", "$", "method", "=", "'post'", ",", "array", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "request", "(", "$", "en...
Make a request and return raw response. @param string $endpoint @param array $params @param string $method @param array $options @return ResponseInterface @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
[ "Make", "a", "request", "and", "return", "raw", "response", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Kernel/BaseClient.php#L128-L131
208,014
overtrue/wechat
src/OfficialAccount/Comment/Client.php
Client.open
public function open(string $msgId, int $index = null) { $params = [ 'msg_data_id' => $msgId, 'index' => $index, ]; return $this->httpPostJson('cgi-bin/comment/open', $params); }
php
public function open(string $msgId, int $index = null) { $params = [ 'msg_data_id' => $msgId, 'index' => $index, ]; return $this->httpPostJson('cgi-bin/comment/open', $params); }
[ "public", "function", "open", "(", "string", "$", "msgId", ",", "int", "$", "index", "=", "null", ")", "{", "$", "params", "=", "[", "'msg_data_id'", "=>", "$", "msgId", ",", "'index'", "=>", "$", "index", ",", "]", ";", "return", "$", "this", "->"...
Open article comment. @param string $msgId @param int|null $index @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Open", "article", "comment", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Comment/Client.php#L31-L39
208,015
overtrue/wechat
src/OfficialAccount/Comment/Client.php
Client.list
public function list(string $msgId, int $index, int $begin, int $count, int $type = 0) { $params = [ 'msg_data_id' => $msgId, 'index' => $index, 'begin' => $begin, 'count' => $count, 'type' => $type, ]; return $this->httpPostJson('...
php
public function list(string $msgId, int $index, int $begin, int $count, int $type = 0) { $params = [ 'msg_data_id' => $msgId, 'index' => $index, 'begin' => $begin, 'count' => $count, 'type' => $type, ]; return $this->httpPostJson('...
[ "public", "function", "list", "(", "string", "$", "msgId", ",", "int", "$", "index", ",", "int", "$", "begin", ",", "int", "$", "count", ",", "int", "$", "type", "=", "0", ")", "{", "$", "params", "=", "[", "'msg_data_id'", "=>", "$", "msgId", ",...
Get article comments. @param string $msgId @param int $index @param int $begin @param int $count @param int $type @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Get", "article", "comments", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Comment/Client.php#L70-L81
208,016
overtrue/wechat
src/OfficialAccount/Comment/Client.php
Client.markElect
public function markElect(string $msgId, int $index, int $commentId) { $params = [ 'msg_data_id' => $msgId, 'index' => $index, 'user_comment_id' => $commentId, ]; return $this->httpPostJson('cgi-bin/comment/markelect', $params); }
php
public function markElect(string $msgId, int $index, int $commentId) { $params = [ 'msg_data_id' => $msgId, 'index' => $index, 'user_comment_id' => $commentId, ]; return $this->httpPostJson('cgi-bin/comment/markelect', $params); }
[ "public", "function", "markElect", "(", "string", "$", "msgId", ",", "int", "$", "index", ",", "int", "$", "commentId", ")", "{", "$", "params", "=", "[", "'msg_data_id'", "=>", "$", "msgId", ",", "'index'", "=>", "$", "index", ",", "'user_comment_id'", ...
Mark elect comment. @param string $msgId @param int $index @param int $commentId @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Mark", "elect", "comment", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Comment/Client.php#L92-L101
208,017
overtrue/wechat
src/OfficialAccount/Comment/Client.php
Client.reply
public function reply(string $msgId, int $index, int $commentId, string $content) { $params = [ 'msg_data_id' => $msgId, 'index' => $index, 'user_comment_id' => $commentId, 'content' => $content, ]; return $this->httpPostJson('cgi-bin/comment/...
php
public function reply(string $msgId, int $index, int $commentId, string $content) { $params = [ 'msg_data_id' => $msgId, 'index' => $index, 'user_comment_id' => $commentId, 'content' => $content, ]; return $this->httpPostJson('cgi-bin/comment/...
[ "public", "function", "reply", "(", "string", "$", "msgId", ",", "int", "$", "index", ",", "int", "$", "commentId", ",", "string", "$", "content", ")", "{", "$", "params", "=", "[", "'msg_data_id'", "=>", "$", "msgId", ",", "'index'", "=>", "$", "ind...
Reply to a comment. @param string $msgId @param int $index @param int $commentId @param string $content @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Reply", "to", "a", "comment", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Comment/Client.php#L153-L163
208,018
overtrue/wechat
src/Kernel/Support/File.php
File.getExtBySignature
public static function getExtBySignature($stream) { $prefix = strval(bin2hex(mb_strcut($stream, 0, 10))); foreach (self::$signatures as $signature => $extension) { if (0 === strpos($prefix, strval($signature))) { return $extension; } } return...
php
public static function getExtBySignature($stream) { $prefix = strval(bin2hex(mb_strcut($stream, 0, 10))); foreach (self::$signatures as $signature => $extension) { if (0 === strpos($prefix, strval($signature))) { return $extension; } } return...
[ "public", "static", "function", "getExtBySignature", "(", "$", "stream", ")", "{", "$", "prefix", "=", "strval", "(", "bin2hex", "(", "mb_strcut", "(", "$", "stream", ",", "0", ",", "10", ")", ")", ")", ";", "foreach", "(", "self", "::", "$", "signat...
Get file extension by file header signature. @param string $stream @return string
[ "Get", "file", "extension", "by", "file", "header", "signature", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Support/File.php#L121-L132
208,019
overtrue/wechat
src/OfficialAccount/User/UserClient.php
UserClient.get
public function get(string $openid, string $lang = 'zh_CN') { $params = [ 'openid' => $openid, 'lang' => $lang, ]; return $this->httpGet('cgi-bin/user/info', $params); }
php
public function get(string $openid, string $lang = 'zh_CN') { $params = [ 'openid' => $openid, 'lang' => $lang, ]; return $this->httpGet('cgi-bin/user/info', $params); }
[ "public", "function", "get", "(", "string", "$", "openid", ",", "string", "$", "lang", "=", "'zh_CN'", ")", "{", "$", "params", "=", "[", "'openid'", "=>", "$", "openid", ",", "'lang'", "=>", "$", "lang", ",", "]", ";", "return", "$", "this", "->",...
Fetch a user by open id. @param string $openid @param string $lang @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Fetch", "a", "user", "by", "open", "id", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/User/UserClient.php#L33-L41
208,020
overtrue/wechat
src/OfficialAccount/User/UserClient.php
UserClient.remark
public function remark(string $openid, string $remark) { $params = [ 'openid' => $openid, 'remark' => $remark, ]; return $this->httpPostJson('cgi-bin/user/info/updateremark', $params); }
php
public function remark(string $openid, string $remark) { $params = [ 'openid' => $openid, 'remark' => $remark, ]; return $this->httpPostJson('cgi-bin/user/info/updateremark', $params); }
[ "public", "function", "remark", "(", "string", "$", "openid", ",", "string", "$", "remark", ")", "{", "$", "params", "=", "[", "'openid'", "=>", "$", "openid", ",", "'remark'", "=>", "$", "remark", ",", "]", ";", "return", "$", "this", "->", "httpPos...
Set user remark. @param string $openid @param string $remark @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Set", "user", "remark", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/User/UserClient.php#L91-L99
208,021
overtrue/wechat
src/OfficialAccount/ShakeAround/DeviceClient.php
DeviceClient.update
public function update(array $deviceIdentifier, string $comment) { $params = [ 'device_identifier' => $deviceIdentifier, 'comment' => $comment, ]; return $this->httpPostJson('shakearound/device/update', $params); }
php
public function update(array $deviceIdentifier, string $comment) { $params = [ 'device_identifier' => $deviceIdentifier, 'comment' => $comment, ]; return $this->httpPostJson('shakearound/device/update', $params); }
[ "public", "function", "update", "(", "array", "$", "deviceIdentifier", ",", "string", "$", "comment", ")", "{", "$", "params", "=", "[", "'device_identifier'", "=>", "$", "deviceIdentifier", ",", "'comment'", "=>", "$", "comment", ",", "]", ";", "return", ...
Update a device comment. @param array $deviceIdentifier @param string $comment @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Update", "a", "device", "comment", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/DeviceClient.php#L58-L66
208,022
overtrue/wechat
src/OfficialAccount/ShakeAround/DeviceClient.php
DeviceClient.bindPoi
public function bindPoi(array $deviceIdentifier, int $poiId) { $params = [ 'device_identifier' => $deviceIdentifier, 'poi_id' => $poiId, ]; return $this->httpPostJson('shakearound/device/bindlocation', $params); }
php
public function bindPoi(array $deviceIdentifier, int $poiId) { $params = [ 'device_identifier' => $deviceIdentifier, 'poi_id' => $poiId, ]; return $this->httpPostJson('shakearound/device/bindlocation', $params); }
[ "public", "function", "bindPoi", "(", "array", "$", "deviceIdentifier", ",", "int", "$", "poiId", ")", "{", "$", "params", "=", "[", "'device_identifier'", "=>", "$", "deviceIdentifier", ",", "'poi_id'", "=>", "$", "poiId", ",", "]", ";", "return", "$", ...
Bind location for device. @param array $deviceIdentifier @param int $poiId @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws InvalidArgumentException
[ "Bind", "location", "for", "device", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/DeviceClient.php#L78-L86
208,023
overtrue/wechat
src/OfficialAccount/ShakeAround/DeviceClient.php
DeviceClient.list
public function list(int $lastId, int $count) { $params = [ 'type' => 2, 'last_seen' => $lastId, 'count' => $count, ]; return $this->search($params); }
php
public function list(int $lastId, int $count) { $params = [ 'type' => 2, 'last_seen' => $lastId, 'count' => $count, ]; return $this->search($params); }
[ "public", "function", "list", "(", "int", "$", "lastId", ",", "int", "$", "count", ")", "{", "$", "params", "=", "[", "'type'", "=>", "2", ",", "'last_seen'", "=>", "$", "lastId", ",", "'count'", "=>", "$", "count", ",", "]", ";", "return", "$", ...
Pagination to get batch of devices. @param int $lastId @param int $count @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Pagination", "to", "get", "batch", "of", "devices", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/DeviceClient.php#L132-L141
208,024
overtrue/wechat
src/OfficialAccount/ShakeAround/DeviceClient.php
DeviceClient.listByApplyId
public function listByApplyId(int $applyId, int $lastId, int $count) { $params = [ 'type' => 3, 'apply_id' => $applyId, 'last_seen' => $lastId, 'count' => $count, ]; return $this->search($params); }
php
public function listByApplyId(int $applyId, int $lastId, int $count) { $params = [ 'type' => 3, 'apply_id' => $applyId, 'last_seen' => $lastId, 'count' => $count, ]; return $this->search($params); }
[ "public", "function", "listByApplyId", "(", "int", "$", "applyId", ",", "int", "$", "lastId", ",", "int", "$", "count", ")", "{", "$", "params", "=", "[", "'type'", "=>", "3", ",", "'apply_id'", "=>", "$", "applyId", ",", "'last_seen'", "=>", "$", "l...
Fetch batch of devices by applyId. @param int $applyId @param int $lastId @param int $count @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Fetch", "batch", "of", "devices", "by", "applyId", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/DeviceClient.php#L152-L162
208,025
overtrue/wechat
src/Kernel/Traits/HasHttpRequests.php
HasHttpRequests.getHttpClient
public function getHttpClient(): ClientInterface { if (!($this->httpClient instanceof ClientInterface)) { if (property_exists($this, 'app') && $this->app['http_client']) { $this->httpClient = $this->app['http_client']; } else { $this->httpClient = new ...
php
public function getHttpClient(): ClientInterface { if (!($this->httpClient instanceof ClientInterface)) { if (property_exists($this, 'app') && $this->app['http_client']) { $this->httpClient = $this->app['http_client']; } else { $this->httpClient = new ...
[ "public", "function", "getHttpClient", "(", ")", ":", "ClientInterface", "{", "if", "(", "!", "(", "$", "this", "->", "httpClient", "instanceof", "ClientInterface", ")", ")", "{", "if", "(", "property_exists", "(", "$", "this", ",", "'app'", ")", "&&", "...
Return GuzzleHttp\ClientInterface instance. @return ClientInterface
[ "Return", "GuzzleHttp", "\\", "ClientInterface", "instance", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Traits/HasHttpRequests.php#L91-L102
208,026
overtrue/wechat
src/Kernel/Traits/HasHttpRequests.php
HasHttpRequests.pushMiddleware
public function pushMiddleware(callable $middleware, string $name = null) { if (!is_null($name)) { $this->middlewares[$name] = $middleware; } else { array_push($this->middlewares, $middleware); } return $this; }
php
public function pushMiddleware(callable $middleware, string $name = null) { if (!is_null($name)) { $this->middlewares[$name] = $middleware; } else { array_push($this->middlewares, $middleware); } return $this; }
[ "public", "function", "pushMiddleware", "(", "callable", "$", "middleware", ",", "string", "$", "name", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "name", ")", ")", "{", "$", "this", "->", "middlewares", "[", "$", "name", "]", "=", ...
Add a middleware. @param callable $middleware @param string|null $name @return $this
[ "Add", "a", "middleware", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Traits/HasHttpRequests.php#L112-L121
208,027
overtrue/wechat
src/Kernel/Traits/HasHttpRequests.php
HasHttpRequests.getHandlerStack
public function getHandlerStack(): HandlerStack { if ($this->handlerStack) { return $this->handlerStack; } $this->handlerStack = HandlerStack::create($this->getGuzzleHandler()); foreach ($this->middlewares as $name => $middleware) { $this->handlerStack->push...
php
public function getHandlerStack(): HandlerStack { if ($this->handlerStack) { return $this->handlerStack; } $this->handlerStack = HandlerStack::create($this->getGuzzleHandler()); foreach ($this->middlewares as $name => $middleware) { $this->handlerStack->push...
[ "public", "function", "getHandlerStack", "(", ")", ":", "HandlerStack", "{", "if", "(", "$", "this", "->", "handlerStack", ")", "{", "return", "$", "this", "->", "handlerStack", ";", "}", "$", "this", "->", "handlerStack", "=", "HandlerStack", "::", "creat...
Build a handler stack. @return \GuzzleHttp\HandlerStack
[ "Build", "a", "handler", "stack", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Traits/HasHttpRequests.php#L177-L190
208,028
overtrue/wechat
src/Kernel/Traits/HasHttpRequests.php
HasHttpRequests.getGuzzleHandler
protected function getGuzzleHandler() { if (property_exists($this, 'app') && isset($this->app['guzzle_handler']) && is_string($this->app['guzzle_handler'])) { $handler = $this->app['guzzle_handler']; return new $handler(); } return \GuzzleHttp\choose_handler(); ...
php
protected function getGuzzleHandler() { if (property_exists($this, 'app') && isset($this->app['guzzle_handler']) && is_string($this->app['guzzle_handler'])) { $handler = $this->app['guzzle_handler']; return new $handler(); } return \GuzzleHttp\choose_handler(); ...
[ "protected", "function", "getGuzzleHandler", "(", ")", "{", "if", "(", "property_exists", "(", "$", "this", ",", "'app'", ")", "&&", "isset", "(", "$", "this", "->", "app", "[", "'guzzle_handler'", "]", ")", "&&", "is_string", "(", "$", "this", "->", "...
Get guzzle handler. @return callable
[ "Get", "guzzle", "handler", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Traits/HasHttpRequests.php#L219-L228
208,029
overtrue/wechat
src/OfficialAccount/User/TagClient.php
TagClient.update
public function update(int $tagId, string $name) { $params = [ 'tag' => [ 'id' => $tagId, 'name' => $name, ], ]; return $this->httpPostJson('cgi-bin/tags/update', $params); }
php
public function update(int $tagId, string $name) { $params = [ 'tag' => [ 'id' => $tagId, 'name' => $name, ], ]; return $this->httpPostJson('cgi-bin/tags/update', $params); }
[ "public", "function", "update", "(", "int", "$", "tagId", ",", "string", "$", "name", ")", "{", "$", "params", "=", "[", "'tag'", "=>", "[", "'id'", "=>", "$", "tagId", ",", "'name'", "=>", "$", "name", ",", "]", ",", "]", ";", "return", "$", "...
Update a tag name. @param int $tagId @param string $name @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Update", "a", "tag", "name", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/User/TagClient.php#L63-L73
208,030
overtrue/wechat
src/OfficialAccount/User/TagClient.php
TagClient.usersOfTag
public function usersOfTag(int $tagId, string $nextOpenId = '') { $params = [ 'tagid' => $tagId, 'next_openid' => $nextOpenId, ]; return $this->httpPostJson('cgi-bin/user/tag/get', $params); }
php
public function usersOfTag(int $tagId, string $nextOpenId = '') { $params = [ 'tagid' => $tagId, 'next_openid' => $nextOpenId, ]; return $this->httpPostJson('cgi-bin/user/tag/get', $params); }
[ "public", "function", "usersOfTag", "(", "int", "$", "tagId", ",", "string", "$", "nextOpenId", "=", "''", ")", "{", "$", "params", "=", "[", "'tagid'", "=>", "$", "tagId", ",", "'next_openid'", "=>", "$", "nextOpenId", ",", "]", ";", "return", "$", ...
Get users from a tag. @param int $tagId @param string $nextOpenId @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Get", "users", "from", "a", "tag", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/User/TagClient.php#L119-L127
208,031
overtrue/wechat
src/OfficialAccount/Broadcasting/Client.php
Client.sendVoice
public function sendVoice(string $mediaId, $reception = null, array $attributes = []) { return $this->sendMessage(new Media($mediaId, 'voice'), $reception, $attributes); }
php
public function sendVoice(string $mediaId, $reception = null, array $attributes = []) { return $this->sendMessage(new Media($mediaId, 'voice'), $reception, $attributes); }
[ "public", "function", "sendVoice", "(", "string", "$", "mediaId", ",", "$", "reception", "=", "null", ",", "array", "$", "attributes", "=", "[", "]", ")", "{", "return", "$", "this", "->", "sendMessage", "(", "new", "Media", "(", "$", "mediaId", ",", ...
Send a voice message. @param string $mediaId @param mixed $reception @param array $attributes @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException @throws \EasyWeChat\Kernel\Exceptions\RuntimeException
[ "Send", "a", "voice", "message", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Broadcasting/Client.php#L163-L166
208,032
overtrue/wechat
src/OfficialAccount/Broadcasting/Client.php
Client.sendImage
public function sendImage(string $mediaId, $reception = null, array $attributes = []) { return $this->sendMessage(new Image($mediaId), $reception, $attributes); }
php
public function sendImage(string $mediaId, $reception = null, array $attributes = []) { return $this->sendMessage(new Image($mediaId), $reception, $attributes); }
[ "public", "function", "sendImage", "(", "string", "$", "mediaId", ",", "$", "reception", "=", "null", ",", "array", "$", "attributes", "=", "[", "]", ")", "{", "return", "$", "this", "->", "sendMessage", "(", "new", "Image", "(", "$", "mediaId", ")", ...
Send a image message. @param mixed $mediaId @param mixed $reception @param array $attributes @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException @throws \EasyWeChat\Kernel\Exceptions\RuntimeException
[ "Send", "a", "image", "message", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Broadcasting/Client.php#L180-L183
208,033
overtrue/wechat
src/OfficialAccount/Broadcasting/Client.php
Client.sendCard
public function sendCard(string $cardId, $reception = null, array $attributes = []) { return $this->sendMessage(new Card($cardId), $reception, $attributes); }
php
public function sendCard(string $cardId, $reception = null, array $attributes = []) { return $this->sendMessage(new Card($cardId), $reception, $attributes); }
[ "public", "function", "sendCard", "(", "string", "$", "cardId", ",", "$", "reception", "=", "null", ",", "array", "$", "attributes", "=", "[", "]", ")", "{", "return", "$", "this", "->", "sendMessage", "(", "new", "Card", "(", "$", "cardId", ")", ","...
Send a card message. @param string $cardId @param mixed $reception @param array $attributes @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException @throws \EasyWeChat\Kernel\Exceptions\RuntimeException
[ "Send", "a", "card", "message", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Broadcasting/Client.php#L214-L217
208,034
overtrue/wechat
src/OfficialAccount/Broadcasting/Client.php
Client.previewText
public function previewText(string $message, $reception, $method = self::PREVIEW_BY_OPENID) { return $this->previewMessage(new Text($message), $reception, $method); }
php
public function previewText(string $message, $reception, $method = self::PREVIEW_BY_OPENID) { return $this->previewMessage(new Text($message), $reception, $method); }
[ "public", "function", "previewText", "(", "string", "$", "message", ",", "$", "reception", ",", "$", "method", "=", "self", "::", "PREVIEW_BY_OPENID", ")", "{", "return", "$", "this", "->", "previewMessage", "(", "new", "Text", "(", "$", "message", ")", ...
Preview a text message. @param mixed $message message @param string $reception @param string $method @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\RuntimeException @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigExcep...
[ "Preview", "a", "text", "message", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Broadcasting/Client.php#L231-L234
208,035
overtrue/wechat
src/OfficialAccount/Broadcasting/Client.php
Client.previewImage
public function previewImage(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) { return $this->previewMessage(new Image($mediaId), $reception, $method); }
php
public function previewImage(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) { return $this->previewMessage(new Image($mediaId), $reception, $method); }
[ "public", "function", "previewImage", "(", "string", "$", "mediaId", ",", "$", "reception", ",", "$", "method", "=", "self", "::", "PREVIEW_BY_OPENID", ")", "{", "return", "$", "this", "->", "previewMessage", "(", "new", "Image", "(", "$", "mediaId", ")", ...
Preview a image message. @param mixed $mediaId message @param string $reception @param string $method @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\RuntimeException @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigExce...
[ "Preview", "a", "image", "message", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Broadcasting/Client.php#L282-L285
208,036
overtrue/wechat
src/OfficialAccount/Broadcasting/Client.php
Client.previewVideo
public function previewVideo(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) { return $this->previewMessage(new Media($mediaId, 'mpvideo'), $reception, $method); }
php
public function previewVideo(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) { return $this->previewMessage(new Media($mediaId, 'mpvideo'), $reception, $method); }
[ "public", "function", "previewVideo", "(", "string", "$", "mediaId", ",", "$", "reception", ",", "$", "method", "=", "self", "::", "PREVIEW_BY_OPENID", ")", "{", "return", "$", "this", "->", "previewMessage", "(", "new", "Media", "(", "$", "mediaId", ",", ...
Preview a video message. @param mixed $mediaId message @param string $reception @param string $method @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\RuntimeException @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigExce...
[ "Preview", "a", "video", "message", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Broadcasting/Client.php#L299-L302
208,037
overtrue/wechat
src/OfficialAccount/Broadcasting/Client.php
Client.previewCard
public function previewCard(string $cardId, $reception, $method = self::PREVIEW_BY_OPENID) { return $this->previewMessage(new Card($cardId), $reception, $method); }
php
public function previewCard(string $cardId, $reception, $method = self::PREVIEW_BY_OPENID) { return $this->previewMessage(new Card($cardId), $reception, $method); }
[ "public", "function", "previewCard", "(", "string", "$", "cardId", ",", "$", "reception", ",", "$", "method", "=", "self", "::", "PREVIEW_BY_OPENID", ")", "{", "return", "$", "this", "->", "previewMessage", "(", "new", "Card", "(", "$", "cardId", ")", ",...
Preview a card message. @param mixed $cardId message @param string $reception @param string $method @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\RuntimeException @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigExcep...
[ "Preview", "a", "card", "message", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Broadcasting/Client.php#L316-L319
208,038
overtrue/wechat
src/OfficialAccount/OCR/Client.php
Client.idCard
public function idCard(string $path, string $type = 'photo') { if (!\in_array($type, $this->allowTypes, true)) { throw new InvalidArgumentException(sprintf("Unsupported type: '%s'", $type)); } return $this->httpGet('cv/ocr/idcard', [ 'type' => $type, 'img...
php
public function idCard(string $path, string $type = 'photo') { if (!\in_array($type, $this->allowTypes, true)) { throw new InvalidArgumentException(sprintf("Unsupported type: '%s'", $type)); } return $this->httpGet('cv/ocr/idcard', [ 'type' => $type, 'img...
[ "public", "function", "idCard", "(", "string", "$", "path", ",", "string", "$", "type", "=", "'photo'", ")", "{", "if", "(", "!", "\\", "in_array", "(", "$", "type", ",", "$", "this", "->", "allowTypes", ",", "true", ")", ")", "{", "throw", "new", ...
ID card OCR. @param string $path @param string $type @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "ID", "card", "OCR", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/OCR/Client.php#L42-L52
208,039
overtrue/wechat
src/OfficialAccount/Store/Client.php
Client.searchFromMap
public function searchFromMap(int $districtId, string $keyword) { $params = [ 'districtid' => $districtId, 'keyword' => $keyword, ]; return $this->httpPostJson('wxa/search_map_poi', $params); }
php
public function searchFromMap(int $districtId, string $keyword) { $params = [ 'districtid' => $districtId, 'keyword' => $keyword, ]; return $this->httpPostJson('wxa/search_map_poi', $params); }
[ "public", "function", "searchFromMap", "(", "int", "$", "districtId", ",", "string", "$", "keyword", ")", "{", "$", "params", "=", "[", "'districtid'", "=>", "$", "districtId", ",", "'keyword'", "=>", "$", "keyword", ",", "]", ";", "return", "$", "this",...
Search store from tencent map. @param int $districtId @param string $keyword @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Search", "store", "from", "tencent", "map", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Store/Client.php#L51-L59
208,040
overtrue/wechat
src/OfficialAccount/Store/Client.php
Client.list
public function list(int $offset = 0, int $limit = 10) { $params = [ 'offset' => $offset, 'limit' => $limit, ]; return $this->httpPostJson('wxa/get_store_list', $params); }
php
public function list(int $offset = 0, int $limit = 10) { $params = [ 'offset' => $offset, 'limit' => $limit, ]; return $this->httpPostJson('wxa/get_store_list', $params); }
[ "public", "function", "list", "(", "int", "$", "offset", "=", "0", ",", "int", "$", "limit", "=", "10", ")", "{", "$", "params", "=", "[", "'offset'", "=>", "$", "offset", ",", "'limit'", "=>", "$", "limit", ",", "]", ";", "return", "$", "this", ...
List store. @param int $offset @param int $limit @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "List", "store", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Store/Client.php#L154-L162
208,041
overtrue/wechat
src/Kernel/Support/Str.php
Str.randomBytes
public static function randomBytes($length = 16) { if (function_exists('random_bytes')) { $bytes = random_bytes($length); } elseif (function_exists('openssl_random_pseudo_bytes')) { $bytes = openssl_random_pseudo_bytes($length, $strong); if (false === $bytes || fa...
php
public static function randomBytes($length = 16) { if (function_exists('random_bytes')) { $bytes = random_bytes($length); } elseif (function_exists('openssl_random_pseudo_bytes')) { $bytes = openssl_random_pseudo_bytes($length, $strong); if (false === $bytes || fa...
[ "public", "static", "function", "randomBytes", "(", "$", "length", "=", "16", ")", "{", "if", "(", "function_exists", "(", "'random_bytes'", ")", ")", "{", "$", "bytes", "=", "random_bytes", "(", "$", "length", ")", ";", "}", "elseif", "(", "function_exi...
Generate a more truly "random" bytes. @param int $length @return string @throws RuntimeException @codeCoverageIgnore @throws \Exception
[ "Generate", "a", "more", "truly", "random", "bytes", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Support/Str.php#L95-L109
208,042
overtrue/wechat
src/OfficialAccount/POI/Client.php
Client.update
public function update(int $poiId, array $baseInfo) { $params = [ 'business' => [ 'base_info' => array_merge($baseInfo, ['poi_id' => $poiId]), ], ]; return $this->httpPostJson('cgi-bin/poi/updatepoi', $params); }
php
public function update(int $poiId, array $baseInfo) { $params = [ 'business' => [ 'base_info' => array_merge($baseInfo, ['poi_id' => $poiId]), ], ]; return $this->httpPostJson('cgi-bin/poi/updatepoi', $params); }
[ "public", "function", "update", "(", "int", "$", "poiId", ",", "array", "$", "baseInfo", ")", "{", "$", "params", "=", "[", "'business'", "=>", "[", "'base_info'", "=>", "array_merge", "(", "$", "baseInfo", ",", "[", "'poi_id'", "=>", "$", "poiId", "]"...
Update a POI. @param int $poiId @param array $baseInfo @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Update", "a", "POI", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/POI/Client.php#L99-L108
208,043
overtrue/wechat
src/Payment/Application.php
Application.setSubMerchant
public function setSubMerchant(string $mchId, string $appId = null) { $this['config']->set('sub_mch_id', $mchId); $this['config']->set('sub_appid', $appId); return $this; }
php
public function setSubMerchant(string $mchId, string $appId = null) { $this['config']->set('sub_mch_id', $mchId); $this['config']->set('sub_appid', $appId); return $this; }
[ "public", "function", "setSubMerchant", "(", "string", "$", "mchId", ",", "string", "$", "appId", "=", "null", ")", "{", "$", "this", "[", "'config'", "]", "->", "set", "(", "'sub_mch_id'", ",", "$", "mchId", ")", ";", "$", "this", "[", "'config'", "...
Set sub-merchant. @param string $mchId @param string|null $appId @return $this
[ "Set", "sub", "-", "merchant", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Application.php#L154-L160
208,044
overtrue/wechat
src/OfficialAccount/Semantic/Client.php
Client.query
public function query(string $keyword, string $categories, array $optional = []) { $params = [ 'query' => $keyword, 'category' => $categories, 'appid' => $this->app['config']['app_id'], ]; return $this->httpPostJson('semantic/semproxy/search', array_merge...
php
public function query(string $keyword, string $categories, array $optional = []) { $params = [ 'query' => $keyword, 'category' => $categories, 'appid' => $this->app['config']['app_id'], ]; return $this->httpPostJson('semantic/semproxy/search', array_merge...
[ "public", "function", "query", "(", "string", "$", "keyword", ",", "string", "$", "categories", ",", "array", "$", "optional", "=", "[", "]", ")", "{", "$", "params", "=", "[", "'query'", "=>", "$", "keyword", ",", "'category'", "=>", "$", "categories"...
Get the semantic content of giving string. @param string $keyword @param string $categories @param array $optional @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Get", "the", "semantic", "content", "of", "giving", "string", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Semantic/Client.php#L32-L41
208,045
overtrue/wechat
src/OpenPlatform/Base/Client.php
Client.handleAuthorize
public function handleAuthorize(string $authCode = null) { $params = [ 'component_appid' => $this->app['config']['app_id'], 'authorization_code' => $authCode ?? $this->app['request']->get('auth_code'), ]; return $this->httpPostJson('cgi-bin/component/api_query_auth',...
php
public function handleAuthorize(string $authCode = null) { $params = [ 'component_appid' => $this->app['config']['app_id'], 'authorization_code' => $authCode ?? $this->app['request']->get('auth_code'), ]; return $this->httpPostJson('cgi-bin/component/api_query_auth',...
[ "public", "function", "handleAuthorize", "(", "string", "$", "authCode", "=", "null", ")", "{", "$", "params", "=", "[", "'component_appid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "[", "'app_id'", "]", ",", "'authorization_code'", "=>", "$"...
Get authorization info. @param string|null $authCode @return mixed
[ "Get", "authorization", "info", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenPlatform/Base/Client.php#L30-L38
208,046
overtrue/wechat
src/OpenPlatform/Base/Client.php
Client.getAuthorizer
public function getAuthorizer(string $appId) { $params = [ 'component_appid' => $this->app['config']['app_id'], 'authorizer_appid' => $appId, ]; return $this->httpPostJson('cgi-bin/component/api_get_authorizer_info', $params); }
php
public function getAuthorizer(string $appId) { $params = [ 'component_appid' => $this->app['config']['app_id'], 'authorizer_appid' => $appId, ]; return $this->httpPostJson('cgi-bin/component/api_get_authorizer_info', $params); }
[ "public", "function", "getAuthorizer", "(", "string", "$", "appId", ")", "{", "$", "params", "=", "[", "'component_appid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "[", "'app_id'", "]", ",", "'authorizer_appid'", "=>", "$", "appId", ",", "]...
Get authorizer info. @param string $appId @return mixed
[ "Get", "authorizer", "info", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenPlatform/Base/Client.php#L47-L55
208,047
overtrue/wechat
src/OpenPlatform/Base/Client.php
Client.setAuthorizerOption
public function setAuthorizerOption(string $appId, string $name, string $value) { $params = [ 'component_appid' => $this->app['config']['app_id'], 'authorizer_appid' => $appId, 'option_name' => $name, 'option_value' => $value, ]; return $this-...
php
public function setAuthorizerOption(string $appId, string $name, string $value) { $params = [ 'component_appid' => $this->app['config']['app_id'], 'authorizer_appid' => $appId, 'option_name' => $name, 'option_value' => $value, ]; return $this-...
[ "public", "function", "setAuthorizerOption", "(", "string", "$", "appId", ",", "string", "$", "name", ",", "string", "$", "value", ")", "{", "$", "params", "=", "[", "'component_appid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "[", "'app_id...
Set authorizer option. @param string $appId @param string $name @param string $value @return mixed
[ "Set", "authorizer", "option", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenPlatform/Base/Client.php#L85-L95
208,048
overtrue/wechat
src/OpenPlatform/Base/Client.php
Client.getAuthorizers
public function getAuthorizers($offset = 0, $count = 500) { $params = [ 'component_appid' => $this->app['config']['app_id'], 'offset' => $offset, 'count' => $count, ]; return $this->httpPostJson('cgi-bin/component/api_get_authorizer_list', $params); }
php
public function getAuthorizers($offset = 0, $count = 500) { $params = [ 'component_appid' => $this->app['config']['app_id'], 'offset' => $offset, 'count' => $count, ]; return $this->httpPostJson('cgi-bin/component/api_get_authorizer_list', $params); }
[ "public", "function", "getAuthorizers", "(", "$", "offset", "=", "0", ",", "$", "count", "=", "500", ")", "{", "$", "params", "=", "[", "'component_appid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "[", "'app_id'", "]", ",", "'offset'", ...
Get authorizer list. @param int $offset @param int $count @return mixed
[ "Get", "authorizer", "list", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenPlatform/Base/Client.php#L105-L114
208,049
overtrue/wechat
src/Work/User/TagClient.php
TagClient.update
public function update(int $tagId, string $tagName) { $params = [ 'tagid' => $tagId, 'tagname' => $tagName, ]; return $this->httpPostJson('cgi-bin/tag/update', $params); }
php
public function update(int $tagId, string $tagName) { $params = [ 'tagid' => $tagId, 'tagname' => $tagName, ]; return $this->httpPostJson('cgi-bin/tag/update', $params); }
[ "public", "function", "update", "(", "int", "$", "tagId", ",", "string", "$", "tagName", ")", "{", "$", "params", "=", "[", "'tagid'", "=>", "$", "tagId", ",", "'tagname'", "=>", "$", "tagName", ",", "]", ";", "return", "$", "this", "->", "httpPostJs...
Update tag. @param int $tagId @param string $tagName @return mixed
[ "Update", "tag", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/User/TagClient.php#L49-L57
208,050
overtrue/wechat
src/Payment/Coupon/Client.php
Client.send
public function send(array $params) { $params['appid'] = $this->app['config']->app_id; $params['openid_count'] = 1; return $this->safeRequest('mmpaymkttransfers/send_coupon', $params); }
php
public function send(array $params) { $params['appid'] = $this->app['config']->app_id; $params['openid_count'] = 1; return $this->safeRequest('mmpaymkttransfers/send_coupon', $params); }
[ "public", "function", "send", "(", "array", "$", "params", ")", "{", "$", "params", "[", "'appid'", "]", "=", "$", "this", "->", "app", "[", "'config'", "]", "->", "app_id", ";", "$", "params", "[", "'openid_count'", "]", "=", "1", ";", "return", "...
send a cash coupon. @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "send", "a", "cash", "coupon", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Coupon/Client.php#L32-L38
208,051
overtrue/wechat
src/OfficialAccount/CustomerService/SessionClient.php
SessionClient.close
public function close(string $account, string $openid) { $params = [ 'kf_account' => $account, 'openid' => $openid, ]; return $this->httpPostJson('customservice/kfsession/close', $params); }
php
public function close(string $account, string $openid) { $params = [ 'kf_account' => $account, 'openid' => $openid, ]; return $this->httpPostJson('customservice/kfsession/close', $params); }
[ "public", "function", "close", "(", "string", "$", "account", ",", "string", "$", "openid", ")", "{", "$", "params", "=", "[", "'kf_account'", "=>", "$", "account", ",", "'openid'", "=>", "$", "openid", ",", "]", ";", "return", "$", "this", "->", "ht...
Close a session. @param string $account @param string $openid @return mixed @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Close", "a", "session", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/CustomerService/SessionClient.php#L79-L87
208,052
overtrue/wechat
src/BasicService/Jssdk/Client.php
Client.getTicket
public function getTicket(bool $refresh = false, string $type = 'jsapi'): array { $cacheKey = sprintf('easywechat.basic_service.jssdk.ticket.%s.%s', $type, $this->getAppId()); if (!$refresh && $this->getCache()->has($cacheKey)) { return $this->getCache()->get($cacheKey); } ...
php
public function getTicket(bool $refresh = false, string $type = 'jsapi'): array { $cacheKey = sprintf('easywechat.basic_service.jssdk.ticket.%s.%s', $type, $this->getAppId()); if (!$refresh && $this->getCache()->has($cacheKey)) { return $this->getCache()->get($cacheKey); } ...
[ "public", "function", "getTicket", "(", "bool", "$", "refresh", "=", "false", ",", "string", "$", "type", "=", "'jsapi'", ")", ":", "array", "{", "$", "cacheKey", "=", "sprintf", "(", "'easywechat.basic_service.jssdk.ticket.%s.%s'", ",", "$", "type", ",", "$...
Get js ticket. @param bool $refresh @param string $type @return array|null @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException @throws \Psr\SimpleCache\InvalidArgumentException @throws \EasyWeChat\Kernel\Exceptions\RuntimeException
[ "Get", "js", "ticket", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/BasicService/Jssdk/Client.php#L91-L111
208,053
overtrue/wechat
src/BasicService/Jssdk/Client.php
Client.getTicketSignature
public function getTicketSignature($ticket, $nonce, $timestamp, $url): string { return sha1(sprintf('jsapi_ticket=%s&noncestr=%s&timestamp=%s&url=%s', $ticket, $nonce, $timestamp, $url)); }
php
public function getTicketSignature($ticket, $nonce, $timestamp, $url): string { return sha1(sprintf('jsapi_ticket=%s&noncestr=%s&timestamp=%s&url=%s', $ticket, $nonce, $timestamp, $url)); }
[ "public", "function", "getTicketSignature", "(", "$", "ticket", ",", "$", "nonce", ",", "$", "timestamp", ",", "$", "url", ")", ":", "string", "{", "return", "sha1", "(", "sprintf", "(", "'jsapi_ticket=%s&noncestr=%s&timestamp=%s&url=%s'", ",", "$", "ticket", ...
Sign the params. @param string $ticket @param string $nonce @param int $timestamp @param string $url @return string
[ "Sign", "the", "params", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/BasicService/Jssdk/Client.php#L151-L154
208,054
overtrue/wechat
src/Work/OA/Client.php
Client.checkinRecords
public function checkinRecords(int $startTime, int $endTime, array $userList, int $type = 3) { $params = [ 'opencheckindatatype' => $type, 'starttime' => $startTime, 'endtime' => $endTime, 'useridlist' => $userList, ]; return $this->httpPostJs...
php
public function checkinRecords(int $startTime, int $endTime, array $userList, int $type = 3) { $params = [ 'opencheckindatatype' => $type, 'starttime' => $startTime, 'endtime' => $endTime, 'useridlist' => $userList, ]; return $this->httpPostJs...
[ "public", "function", "checkinRecords", "(", "int", "$", "startTime", ",", "int", "$", "endTime", ",", "array", "$", "userList", ",", "int", "$", "type", "=", "3", ")", "{", "$", "params", "=", "[", "'opencheckindatatype'", "=>", "$", "type", ",", "'st...
Get the checkin data. @param int $startTime @param int $endTime @param array $userList @param int $type @return mixed
[ "Get", "the", "checkin", "data", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/OA/Client.php#L33-L43
208,055
overtrue/wechat
src/Work/OA/Client.php
Client.approvalRecords
public function approvalRecords(int $startTime, int $endTime, int $nextNumber = null) { $params = [ 'starttime' => $startTime, 'endtime' => $endTime, 'next_spnum' => $nextNumber, ]; return $this->httpPostJson('cgi-bin/corp/getapprovaldata', $params); ...
php
public function approvalRecords(int $startTime, int $endTime, int $nextNumber = null) { $params = [ 'starttime' => $startTime, 'endtime' => $endTime, 'next_spnum' => $nextNumber, ]; return $this->httpPostJson('cgi-bin/corp/getapprovaldata', $params); ...
[ "public", "function", "approvalRecords", "(", "int", "$", "startTime", ",", "int", "$", "endTime", ",", "int", "$", "nextNumber", "=", "null", ")", "{", "$", "params", "=", "[", "'starttime'", "=>", "$", "startTime", ",", "'endtime'", "=>", "$", "endTime...
Get Approval Data. @param int $startTime @param int $endTime @param int $nextNumber @return mixed
[ "Get", "Approval", "Data", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/OA/Client.php#L54-L63
208,056
overtrue/wechat
src/OfficialAccount/ShakeAround/GroupClient.php
GroupClient.update
public function update(int $groupId, string $name) { $params = [ 'group_id' => $groupId, 'group_name' => $name, ]; return $this->httpPostJson('shakearound/device/group/update', $params); }
php
public function update(int $groupId, string $name) { $params = [ 'group_id' => $groupId, 'group_name' => $name, ]; return $this->httpPostJson('shakearound/device/group/update', $params); }
[ "public", "function", "update", "(", "int", "$", "groupId", ",", "string", "$", "name", ")", "{", "$", "params", "=", "[", "'group_id'", "=>", "$", "groupId", ",", "'group_name'", "=>", "$", "name", ",", "]", ";", "return", "$", "this", "->", "httpPo...
Update a device group name. @param int $groupId @param string $name @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Update", "a", "device", "group", "name", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/GroupClient.php#L47-L55
208,057
overtrue/wechat
src/OfficialAccount/ShakeAround/GroupClient.php
GroupClient.list
public function list(int $begin, int $count) { $params = [ 'begin' => $begin, 'count' => $count, ]; return $this->httpPostJson('shakearound/device/group/getlist', $params); }
php
public function list(int $begin, int $count) { $params = [ 'begin' => $begin, 'count' => $count, ]; return $this->httpPostJson('shakearound/device/group/getlist', $params); }
[ "public", "function", "list", "(", "int", "$", "begin", ",", "int", "$", "count", ")", "{", "$", "params", "=", "[", "'begin'", "=>", "$", "begin", ",", "'count'", "=>", "$", "count", ",", "]", ";", "return", "$", "this", "->", "httpPostJson", "(",...
List all device groups. @param int $begin @param int $count @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "List", "all", "device", "groups", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/GroupClient.php#L81-L89
208,058
overtrue/wechat
src/OfficialAccount/ShakeAround/GroupClient.php
GroupClient.get
public function get(int $groupId, int $begin, int $count) { $params = [ 'group_id' => $groupId, 'begin' => $begin, 'count' => $count, ]; return $this->httpPostJson('shakearound/device/group/getdetail', $params); }
php
public function get(int $groupId, int $begin, int $count) { $params = [ 'group_id' => $groupId, 'begin' => $begin, 'count' => $count, ]; return $this->httpPostJson('shakearound/device/group/getdetail', $params); }
[ "public", "function", "get", "(", "int", "$", "groupId", ",", "int", "$", "begin", ",", "int", "$", "count", ")", "{", "$", "params", "=", "[", "'group_id'", "=>", "$", "groupId", ",", "'begin'", "=>", "$", "begin", ",", "'count'", "=>", "$", "coun...
Get detail of a device group. @param int $groupId @param int $begin @param int $count @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Get", "detail", "of", "a", "device", "group", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/GroupClient.php#L100-L109
208,059
overtrue/wechat
src/OfficialAccount/ShakeAround/GroupClient.php
GroupClient.addDevices
public function addDevices(int $groupId, array $deviceIdentifiers) { $params = [ 'group_id' => $groupId, 'device_identifiers' => $deviceIdentifiers, ]; return $this->httpPostJson('shakearound/device/group/adddevice', $params); }
php
public function addDevices(int $groupId, array $deviceIdentifiers) { $params = [ 'group_id' => $groupId, 'device_identifiers' => $deviceIdentifiers, ]; return $this->httpPostJson('shakearound/device/group/adddevice', $params); }
[ "public", "function", "addDevices", "(", "int", "$", "groupId", ",", "array", "$", "deviceIdentifiers", ")", "{", "$", "params", "=", "[", "'group_id'", "=>", "$", "groupId", ",", "'device_identifiers'", "=>", "$", "deviceIdentifiers", ",", "]", ";", "return...
Add one or more devices to a device group. @param int $groupId @param array $deviceIdentifiers @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Add", "one", "or", "more", "devices", "to", "a", "device", "group", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/GroupClient.php#L119-L127
208,060
overtrue/wechat
src/OfficialAccount/ShakeAround/GroupClient.php
GroupClient.removeDevices
public function removeDevices(int $groupId, array $deviceIdentifiers) { $params = [ 'group_id' => $groupId, 'device_identifiers' => $deviceIdentifiers, ]; return $this->httpPostJson('shakearound/device/group/deletedevice', $params); }
php
public function removeDevices(int $groupId, array $deviceIdentifiers) { $params = [ 'group_id' => $groupId, 'device_identifiers' => $deviceIdentifiers, ]; return $this->httpPostJson('shakearound/device/group/deletedevice', $params); }
[ "public", "function", "removeDevices", "(", "int", "$", "groupId", ",", "array", "$", "deviceIdentifiers", ")", "{", "$", "params", "=", "[", "'group_id'", "=>", "$", "groupId", ",", "'device_identifiers'", "=>", "$", "deviceIdentifiers", ",", "]", ";", "ret...
Remove one or more devices from a device group. @param int $groupId @param array $deviceIdentifiers @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Remove", "one", "or", "more", "devices", "from", "a", "device", "group", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/GroupClient.php#L137-L145
208,061
overtrue/wechat
src/Kernel/Traits/HasAttributes.php
HasAttributes.checkRequiredAttributes
protected function checkRequiredAttributes() { foreach ($this->getRequired() as $attribute) { if (is_null($this->get($attribute))) { throw new InvalidArgumentException(sprintf('"%s" cannot be empty.', $attribute)); } } }
php
protected function checkRequiredAttributes() { foreach ($this->getRequired() as $attribute) { if (is_null($this->get($attribute))) { throw new InvalidArgumentException(sprintf('"%s" cannot be empty.', $attribute)); } } }
[ "protected", "function", "checkRequiredAttributes", "(", ")", "{", "foreach", "(", "$", "this", "->", "getRequired", "(", ")", "as", "$", "attribute", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "get", "(", "$", "attribute", ")", ")", ")", ...
Check required attributes. @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
[ "Check", "required", "attributes", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Traits/HasAttributes.php#L241-L248
208,062
overtrue/wechat
src/OfficialAccount/ShakeAround/MaterialClient.php
MaterialClient.uploadImage
public function uploadImage(string $path, string $type = 'icon') { if (!file_exists($path) || !is_readable($path)) { throw new InvalidArgumentException(sprintf('File does not exist, or the file is unreadable: "%s"', $path)); } return $this->httpUpload('shakearound/material/add',...
php
public function uploadImage(string $path, string $type = 'icon') { if (!file_exists($path) || !is_readable($path)) { throw new InvalidArgumentException(sprintf('File does not exist, or the file is unreadable: "%s"', $path)); } return $this->httpUpload('shakearound/material/add',...
[ "public", "function", "uploadImage", "(", "string", "$", "path", ",", "string", "$", "type", "=", "'icon'", ")", "{", "if", "(", "!", "file_exists", "(", "$", "path", ")", "||", "!", "is_readable", "(", "$", "path", ")", ")", "{", "throw", "new", "...
Upload image material. @param string $path @param string $type @return string @throws InvalidArgumentException
[ "Upload", "image", "material", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/MaterialClient.php#L34-L41
208,063
overtrue/wechat
src/Kernel/Http/Response.php
Response.toArray
public function toArray() { $content = $this->removeControlCharacters($this->getBodyContents()); if (false !== stripos($this->getHeaderLine('Content-Type'), 'xml') || 0 === stripos($content, '<xml')) { return XML::parse($content); } $array = json_decode($content, true, ...
php
public function toArray() { $content = $this->removeControlCharacters($this->getBodyContents()); if (false !== stripos($this->getHeaderLine('Content-Type'), 'xml') || 0 === stripos($content, '<xml')) { return XML::parse($content); } $array = json_decode($content, true, ...
[ "public", "function", "toArray", "(", ")", "{", "$", "content", "=", "$", "this", "->", "removeControlCharacters", "(", "$", "this", "->", "getBodyContents", "(", ")", ")", ";", "if", "(", "false", "!==", "stripos", "(", "$", "this", "->", "getHeaderLine...
Build to array. @return array
[ "Build", "to", "array", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Http/Response.php#L69-L84
208,064
overtrue/wechat
src/OfficialAccount/Material/Client.php
Client.list
public function list(string $type, int $offset = 0, int $count = 20) { $params = [ 'type' => $type, 'offset' => $offset, 'count' => $count, ]; return $this->httpPostJson('cgi-bin/material/batchget_material', $params); }
php
public function list(string $type, int $offset = 0, int $count = 20) { $params = [ 'type' => $type, 'offset' => $offset, 'count' => $count, ]; return $this->httpPostJson('cgi-bin/material/batchget_material', $params); }
[ "public", "function", "list", "(", "string", "$", "type", ",", "int", "$", "offset", "=", "0", ",", "int", "$", "count", "=", "20", ")", "{", "$", "params", "=", "[", "'type'", "=>", "$", "type", ",", "'offset'", "=>", "$", "offset", ",", "'count...
List materials. example: { "total_count": TOTAL_COUNT, "item_count": ITEM_COUNT, "item": [{ "media_id": MEDIA_ID, "name": NAME, "update_time": UPDATE_TIME }, // more... ] } @param string $type @param int $offset @param int $count @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collectio...
[ "List", "materials", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/Material/Client.php#L225-L234
208,065
overtrue/wechat
src/OpenPlatform/Server/Guard.php
Guard.registerHandlers
protected function registerHandlers() { $this->on(self::EVENT_AUTHORIZED, Authorized::class); $this->on(self::EVENT_UNAUTHORIZED, Unauthorized::class); $this->on(self::EVENT_UPDATE_AUTHORIZED, UpdateAuthorized::class); $this->on(self::EVENT_COMPONENT_VERIFY_TICKET, VerifyTicketRefres...
php
protected function registerHandlers() { $this->on(self::EVENT_AUTHORIZED, Authorized::class); $this->on(self::EVENT_UNAUTHORIZED, Unauthorized::class); $this->on(self::EVENT_UPDATE_AUTHORIZED, UpdateAuthorized::class); $this->on(self::EVENT_COMPONENT_VERIFY_TICKET, VerifyTicketRefres...
[ "protected", "function", "registerHandlers", "(", ")", "{", "$", "this", "->", "on", "(", "self", "::", "EVENT_AUTHORIZED", ",", "Authorized", "::", "class", ")", ";", "$", "this", "->", "on", "(", "self", "::", "EVENT_UNAUTHORIZED", ",", "Unauthorized", "...
Register event handlers.
[ "Register", "event", "handlers", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OpenPlatform/Server/Guard.php#L52-L58
208,066
overtrue/wechat
src/Payment/Reverse/Client.php
Client.reverse
protected function reverse(string $number, string $type) { $params = [ 'appid' => $this->app['config']->app_id, $type => $number, ]; return $this->safeRequest($this->wrap('secapi/pay/reverse'), $params); }
php
protected function reverse(string $number, string $type) { $params = [ 'appid' => $this->app['config']->app_id, $type => $number, ]; return $this->safeRequest($this->wrap('secapi/pay/reverse'), $params); }
[ "protected", "function", "reverse", "(", "string", "$", "number", ",", "string", "$", "type", ")", "{", "$", "params", "=", "[", "'appid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "->", "app_id", ",", "$", "type", "=>", "$", "number", ...
Reverse order. @param string $number @param string $type @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Reverse", "order", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Reverse/Client.php#L56-L64
208,067
overtrue/wechat
src/Kernel/Log/LogManager.php
LogManager.resolve
protected function resolve($name) { $config = $this->app['config']->get(\sprintf('log.channels.%s', $name)); if (is_null($config)) { throw new \InvalidArgumentException(\sprintf('Log [%s] is not defined.', $name)); } if (isset($this->customCreators[$config['driver']])) ...
php
protected function resolve($name) { $config = $this->app['config']->get(\sprintf('log.channels.%s', $name)); if (is_null($config)) { throw new \InvalidArgumentException(\sprintf('Log [%s] is not defined.', $name)); } if (isset($this->customCreators[$config['driver']])) ...
[ "protected", "function", "resolve", "(", "$", "name", ")", "{", "$", "config", "=", "$", "this", "->", "app", "[", "'config'", "]", "->", "get", "(", "\\", "sprintf", "(", "'log.channels.%s'", ",", "$", "name", ")", ")", ";", "if", "(", "is_null", ...
Resolve the given log instance by name. @param string $name @return \Psr\Log\LoggerInterface @throws \InvalidArgumentException
[ "Resolve", "the", "given", "log", "instance", "by", "name", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Log/LogManager.php#L145-L164
208,068
overtrue/wechat
src/Kernel/Log/LogManager.php
LogManager.formatter
protected function formatter() { $formatter = new LineFormatter(null, null, true, true); $formatter->includeStacktraces(); return $formatter; }
php
protected function formatter() { $formatter = new LineFormatter(null, null, true, true); $formatter->includeStacktraces(); return $formatter; }
[ "protected", "function", "formatter", "(", ")", "{", "$", "formatter", "=", "new", "LineFormatter", "(", "null", ",", "null", ",", "true", ",", "true", ")", ";", "$", "formatter", "->", "includeStacktraces", "(", ")", ";", "return", "$", "formatter", ";"...
Get a Monolog formatter instance. @return \Monolog\Formatter\FormatterInterface
[ "Get", "a", "Monolog", "formatter", "instance", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Log/LogManager.php#L328-L334
208,069
overtrue/wechat
src/OfficialAccount/TemplateMessage/Client.php
Client.send
public function send($data = []) { $params = $this->formatMessage($data); $this->restoreMessage(); return $this->httpPostJson(static::API_SEND, $params); }
php
public function send($data = []) { $params = $this->formatMessage($data); $this->restoreMessage(); return $this->httpPostJson(static::API_SEND, $params); }
[ "public", "function", "send", "(", "$", "data", "=", "[", "]", ")", "{", "$", "params", "=", "$", "this", "->", "formatMessage", "(", "$", "data", ")", ";", "$", "this", "->", "restoreMessage", "(", ")", ";", "return", "$", "this", "->", "httpPostJ...
Send a template message. @param $data @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
[ "Send", "a", "template", "message", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/TemplateMessage/Client.php#L122-L129
208,070
overtrue/wechat
src/OfficialAccount/TemplateMessage/Client.php
Client.sendSubscription
public function sendSubscription(array $data = []) { $params = $this->formatMessage($data); $this->restoreMessage(); return $this->httpPostJson('cgi-bin/message/template/subscribe', $params); }
php
public function sendSubscription(array $data = []) { $params = $this->formatMessage($data); $this->restoreMessage(); return $this->httpPostJson('cgi-bin/message/template/subscribe', $params); }
[ "public", "function", "sendSubscription", "(", "array", "$", "data", "=", "[", "]", ")", "{", "$", "params", "=", "$", "this", "->", "formatMessage", "(", "$", "data", ")", ";", "$", "this", "->", "restoreMessage", "(", ")", ";", "return", "$", "this...
Send template-message for subscription. @param array $data @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
[ "Send", "template", "-", "message", "for", "subscription", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/TemplateMessage/Client.php#L140-L147
208,071
overtrue/wechat
src/Payment/Order/Client.php
Client.unify
public function unify(array $params) { if (empty($params['spbill_create_ip'])) { $params['spbill_create_ip'] = ('NATIVE' === $params['trade_type']) ? Support\get_server_ip() : Support\get_client_ip(); } $params['appid'] = $this->app['config']->app_id; $params['notify_url...
php
public function unify(array $params) { if (empty($params['spbill_create_ip'])) { $params['spbill_create_ip'] = ('NATIVE' === $params['trade_type']) ? Support\get_server_ip() : Support\get_client_ip(); } $params['appid'] = $this->app['config']->app_id; $params['notify_url...
[ "public", "function", "unify", "(", "array", "$", "params", ")", "{", "if", "(", "empty", "(", "$", "params", "[", "'spbill_create_ip'", "]", ")", ")", "{", "$", "params", "[", "'spbill_create_ip'", "]", "=", "(", "'NATIVE'", "===", "$", "params", "[",...
Unify order. @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Unify", "order", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Order/Client.php#L28-L38
208,072
overtrue/wechat
src/Payment/Order/Client.php
Client.close
public function close(string $tradeNo) { $params = [ 'appid' => $this->app['config']->app_id, 'out_trade_no' => $tradeNo, ]; return $this->request($this->wrap('pay/closeorder'), $params); }
php
public function close(string $tradeNo) { $params = [ 'appid' => $this->app['config']->app_id, 'out_trade_no' => $tradeNo, ]; return $this->request($this->wrap('pay/closeorder'), $params); }
[ "public", "function", "close", "(", "string", "$", "tradeNo", ")", "{", "$", "params", "=", "[", "'appid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "->", "app_id", ",", "'out_trade_no'", "=>", "$", "tradeNo", ",", "]", ";", "return", "$...
Close order by out_trade_no. @param string $tradeNo @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Close", "order", "by", "out_trade_no", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Order/Client.php#L95-L103
208,073
overtrue/wechat
src/Work/User/Client.php
Client.getDepartmentUsers
public function getDepartmentUsers(int $departmentId, bool $fetchChild = false) { $params = [ 'department_id' => $departmentId, 'fetch_child' => (int) $fetchChild, ]; return $this->httpGet('cgi-bin/user/simplelist', $params); }
php
public function getDepartmentUsers(int $departmentId, bool $fetchChild = false) { $params = [ 'department_id' => $departmentId, 'fetch_child' => (int) $fetchChild, ]; return $this->httpGet('cgi-bin/user/simplelist', $params); }
[ "public", "function", "getDepartmentUsers", "(", "int", "$", "departmentId", ",", "bool", "$", "fetchChild", "=", "false", ")", "{", "$", "params", "=", "[", "'department_id'", "=>", "$", "departmentId", ",", "'fetch_child'", "=>", "(", "int", ")", "$", "f...
Get simple user list. @param int $departmentId @param bool $fetchChild @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Get", "simple", "user", "list", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/User/Client.php#L96-L104
208,074
overtrue/wechat
src/Work/User/Client.php
Client.userIdToOpenid
public function userIdToOpenid(string $userId, int $agentId = null) { $params = [ 'userid' => $userId, 'agentid' => $agentId, ]; return $this->httpPostJson('cgi-bin/user/convert_to_openid', $params); }
php
public function userIdToOpenid(string $userId, int $agentId = null) { $params = [ 'userid' => $userId, 'agentid' => $agentId, ]; return $this->httpPostJson('cgi-bin/user/convert_to_openid', $params); }
[ "public", "function", "userIdToOpenid", "(", "string", "$", "userId", ",", "int", "$", "agentId", "=", "null", ")", "{", "$", "params", "=", "[", "'userid'", "=>", "$", "userId", ",", "'agentid'", "=>", "$", "agentId", ",", "]", ";", "return", "$", "...
Convert userId to openid. @param string $userId @param int|null $agentId @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Convert", "userId", "to", "openid", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/User/Client.php#L132-L140
208,075
overtrue/wechat
src/OfficialAccount/ShakeAround/Client.php
Client.user
public function user(string $ticket, bool $needPoi = false) { $params = [ 'ticket' => $ticket, ]; if ($needPoi) { $params['need_poi'] = 1; } return $this->httpPostJson('shakearound/user/getshakeinfo', $params); }
php
public function user(string $ticket, bool $needPoi = false) { $params = [ 'ticket' => $ticket, ]; if ($needPoi) { $params['need_poi'] = 1; } return $this->httpPostJson('shakearound/user/getshakeinfo', $params); }
[ "public", "function", "user", "(", "string", "$", "ticket", ",", "bool", "$", "needPoi", "=", "false", ")", "{", "$", "params", "=", "[", "'ticket'", "=>", "$", "ticket", ",", "]", ";", "if", "(", "$", "needPoi", ")", "{", "$", "params", "[", "'n...
Get shake info. @param string $ticket @param bool $needPoi @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Get", "shake", "info", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/Client.php#L51-L62
208,076
overtrue/wechat
src/OfficialAccount/ShakeAround/StatsClient.php
StatsClient.deviceSummary
public function deviceSummary(array $deviceIdentifier, int $beginTime, int $endTime) { $params = [ 'device_identifier' => $deviceIdentifier, 'begin_date' => $beginTime, 'end_date' => $endTime, ]; return $this->httpPostJson('shakearound/statistics/device',...
php
public function deviceSummary(array $deviceIdentifier, int $beginTime, int $endTime) { $params = [ 'device_identifier' => $deviceIdentifier, 'begin_date' => $beginTime, 'end_date' => $endTime, ]; return $this->httpPostJson('shakearound/statistics/device',...
[ "public", "function", "deviceSummary", "(", "array", "$", "deviceIdentifier", ",", "int", "$", "beginTime", ",", "int", "$", "endTime", ")", "{", "$", "params", "=", "[", "'device_identifier'", "=>", "$", "deviceIdentifier", ",", "'begin_date'", "=>", "$", "...
Fetch statistics data by deviceId. @param array $deviceIdentifier @param int $beginTime (Unix timestamp) @param int $endTime (Unix timestamp) @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Fetch", "statistics", "data", "by", "deviceId", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/StatsClient.php#L32-L41
208,077
overtrue/wechat
src/OfficialAccount/ShakeAround/StatsClient.php
StatsClient.devicesSummary
public function devicesSummary(int $timestamp, int $pageIndex) { $params = [ 'date' => $timestamp, 'page_index' => $pageIndex, ]; return $this->httpPostJson('shakearound/statistics/devicelist', $params); }
php
public function devicesSummary(int $timestamp, int $pageIndex) { $params = [ 'date' => $timestamp, 'page_index' => $pageIndex, ]; return $this->httpPostJson('shakearound/statistics/devicelist', $params); }
[ "public", "function", "devicesSummary", "(", "int", "$", "timestamp", ",", "int", "$", "pageIndex", ")", "{", "$", "params", "=", "[", "'date'", "=>", "$", "timestamp", ",", "'page_index'", "=>", "$", "pageIndex", ",", "]", ";", "return", "$", "this", ...
Fetch all devices statistics data by date. @param int $timestamp @param int $pageIndex @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Fetch", "all", "devices", "statistics", "data", "by", "date", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/StatsClient.php#L51-L59
208,078
overtrue/wechat
src/OfficialAccount/ShakeAround/StatsClient.php
StatsClient.pageSummary
public function pageSummary(int $pageId, int $beginTime, int $endTime) { $params = [ 'page_id' => $pageId, 'begin_date' => $beginTime, 'end_date' => $endTime, ]; return $this->httpPostJson('shakearound/statistics/page', $params); }
php
public function pageSummary(int $pageId, int $beginTime, int $endTime) { $params = [ 'page_id' => $pageId, 'begin_date' => $beginTime, 'end_date' => $endTime, ]; return $this->httpPostJson('shakearound/statistics/page', $params); }
[ "public", "function", "pageSummary", "(", "int", "$", "pageId", ",", "int", "$", "beginTime", ",", "int", "$", "endTime", ")", "{", "$", "params", "=", "[", "'page_id'", "=>", "$", "pageId", ",", "'begin_date'", "=>", "$", "beginTime", ",", "'end_date'",...
Fetch statistics data by pageId. @param int $pageId @param int $beginTime (Unix timestamp) @param int $endTime (Unix timestamp) @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Fetch", "statistics", "data", "by", "pageId", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/StatsClient.php#L70-L79
208,079
overtrue/wechat
src/OfficialAccount/ShakeAround/StatsClient.php
StatsClient.pagesSummary
public function pagesSummary(int $timestamp, int $pageIndex) { $params = [ 'date' => $timestamp, 'page_index' => $pageIndex, ]; return $this->httpPostJson('shakearound/statistics/pagelist', $params); }
php
public function pagesSummary(int $timestamp, int $pageIndex) { $params = [ 'date' => $timestamp, 'page_index' => $pageIndex, ]; return $this->httpPostJson('shakearound/statistics/pagelist', $params); }
[ "public", "function", "pagesSummary", "(", "int", "$", "timestamp", ",", "int", "$", "pageIndex", ")", "{", "$", "params", "=", "[", "'date'", "=>", "$", "timestamp", ",", "'page_index'", "=>", "$", "pageIndex", ",", "]", ";", "return", "$", "this", "-...
Fetch all pages statistics data by date. @param int $timestamp @param int $pageIndex @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Fetch", "all", "pages", "statistics", "data", "by", "date", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/OfficialAccount/ShakeAround/StatsClient.php#L89-L97
208,080
overtrue/wechat
src/Kernel/Support/XML.php
XML.parse
public static function parse($xml) { $backup = libxml_disable_entity_loader(true); $result = self::normalize(simplexml_load_string(self::sanitize($xml), 'SimpleXMLElement', LIBXML_COMPACT | LIBXML_NOCDATA | LIBXML_NOBLANKS)); libxml_disable_entity_loader($backup); return $result; ...
php
public static function parse($xml) { $backup = libxml_disable_entity_loader(true); $result = self::normalize(simplexml_load_string(self::sanitize($xml), 'SimpleXMLElement', LIBXML_COMPACT | LIBXML_NOCDATA | LIBXML_NOBLANKS)); libxml_disable_entity_loader($backup); return $result; ...
[ "public", "static", "function", "parse", "(", "$", "xml", ")", "{", "$", "backup", "=", "libxml_disable_entity_loader", "(", "true", ")", ";", "$", "result", "=", "self", "::", "normalize", "(", "simplexml_load_string", "(", "self", "::", "sanitize", "(", ...
XML to array. @param string $xml XML string @return array
[ "XML", "to", "array", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Support/XML.php#L28-L37
208,081
overtrue/wechat
src/Kernel/Support/XML.php
XML.normalize
protected static function normalize($obj) { $result = null; if (is_object($obj)) { $obj = (array) $obj; } if (is_array($obj)) { foreach ($obj as $key => $value) { $res = self::normalize($value); if (('@attributes' === $key) &&...
php
protected static function normalize($obj) { $result = null; if (is_object($obj)) { $obj = (array) $obj; } if (is_array($obj)) { foreach ($obj as $key => $value) { $res = self::normalize($value); if (('@attributes' === $key) &&...
[ "protected", "static", "function", "normalize", "(", "$", "obj", ")", "{", "$", "result", "=", "null", ";", "if", "(", "is_object", "(", "$", "obj", ")", ")", "{", "$", "obj", "=", "(", "array", ")", "$", "obj", ";", "}", "if", "(", "is_array", ...
Object to array. @param SimpleXMLElement $obj @return array
[ "Object", "to", "array", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Support/XML.php#L96-L118
208,082
overtrue/wechat
src/Payment/Redpack/Client.php
Client.info
public function info($mchBillno) { $params = is_array($mchBillno) ? $mchBillno : ['mch_billno' => $mchBillno]; $base = [ 'appid' => $this->app['config']->app_id, 'bill_type' => 'MCHT', ]; return $this->safeRequest('mmpaymkttransfers/gethbinfo', array_merge($b...
php
public function info($mchBillno) { $params = is_array($mchBillno) ? $mchBillno : ['mch_billno' => $mchBillno]; $base = [ 'appid' => $this->app['config']->app_id, 'bill_type' => 'MCHT', ]; return $this->safeRequest('mmpaymkttransfers/gethbinfo', array_merge($b...
[ "public", "function", "info", "(", "$", "mchBillno", ")", "{", "$", "params", "=", "is_array", "(", "$", "mchBillno", ")", "?", "$", "mchBillno", ":", "[", "'mch_billno'", "=>", "$", "mchBillno", "]", ";", "$", "base", "=", "[", "'appid'", "=>", "$",...
Query redpack. @param mixed $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Query", "redpack", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Redpack/Client.php#L33-L42
208,083
overtrue/wechat
src/Payment/Redpack/Client.php
Client.sendNormal
public function sendNormal(array $params) { $base = [ 'total_num' => 1, 'client_ip' => $params['client_ip'] ?? Support\get_server_ip(), 'wxappid' => $this->app['config']->app_id, ]; return $this->safeRequest('mmpaymkttransfers/sendredpack', array_merge($b...
php
public function sendNormal(array $params) { $base = [ 'total_num' => 1, 'client_ip' => $params['client_ip'] ?? Support\get_server_ip(), 'wxappid' => $this->app['config']->app_id, ]; return $this->safeRequest('mmpaymkttransfers/sendredpack', array_merge($b...
[ "public", "function", "sendNormal", "(", "array", "$", "params", ")", "{", "$", "base", "=", "[", "'total_num'", "=>", "1", ",", "'client_ip'", "=>", "$", "params", "[", "'client_ip'", "]", "??", "Support", "\\", "get_server_ip", "(", ")", ",", "'wxappid...
Send normal redpack. @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Send", "normal", "redpack", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Redpack/Client.php#L53-L62
208,084
overtrue/wechat
src/Payment/Redpack/Client.php
Client.sendGroup
public function sendGroup(array $params) { $base = [ 'amt_type' => 'ALL_RAND', 'wxappid' => $this->app['config']->app_id, ]; return $this->safeRequest('mmpaymkttransfers/sendgroupredpack', array_merge($base, $params)); }
php
public function sendGroup(array $params) { $base = [ 'amt_type' => 'ALL_RAND', 'wxappid' => $this->app['config']->app_id, ]; return $this->safeRequest('mmpaymkttransfers/sendgroupredpack', array_merge($base, $params)); }
[ "public", "function", "sendGroup", "(", "array", "$", "params", ")", "{", "$", "base", "=", "[", "'amt_type'", "=>", "'ALL_RAND'", ",", "'wxappid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "->", "app_id", ",", "]", ";", "return", "$", "...
Send group redpack. @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Send", "group", "redpack", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Redpack/Client.php#L73-L81
208,085
overtrue/wechat
src/BasicService/QrCode/Client.php
Client.forever
public function forever($sceneValue) { if (is_int($sceneValue) && $sceneValue > 0 && $sceneValue < self::SCENE_MAX_VALUE) { $type = self::SCENE_QR_FOREVER; $sceneKey = 'scene_id'; } else { $type = self::SCENE_QR_FOREVER_STR; $sceneKey = 'scene_str'; ...
php
public function forever($sceneValue) { if (is_int($sceneValue) && $sceneValue > 0 && $sceneValue < self::SCENE_MAX_VALUE) { $type = self::SCENE_QR_FOREVER; $sceneKey = 'scene_id'; } else { $type = self::SCENE_QR_FOREVER_STR; $sceneKey = 'scene_str'; ...
[ "public", "function", "forever", "(", "$", "sceneValue", ")", "{", "if", "(", "is_int", "(", "$", "sceneValue", ")", "&&", "$", "sceneValue", ">", "0", "&&", "$", "sceneValue", "<", "self", "::", "SCENE_MAX_VALUE", ")", "{", "$", "type", "=", "self", ...
Create forever QR code. @param string|int $sceneValue @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Create", "forever", "QR", "code", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/BasicService/QrCode/Client.php#L43-L55
208,086
overtrue/wechat
src/BasicService/QrCode/Client.php
Client.temporary
public function temporary($sceneValue, $expireSeconds = null) { if (is_int($sceneValue) && $sceneValue > 0) { $type = self::SCENE_QR_TEMPORARY; $sceneKey = 'scene_id'; } else { $type = self::SCENE_QR_TEMPORARY_STR; $sceneKey = 'scene_str'; } ...
php
public function temporary($sceneValue, $expireSeconds = null) { if (is_int($sceneValue) && $sceneValue > 0) { $type = self::SCENE_QR_TEMPORARY; $sceneKey = 'scene_id'; } else { $type = self::SCENE_QR_TEMPORARY_STR; $sceneKey = 'scene_str'; } ...
[ "public", "function", "temporary", "(", "$", "sceneValue", ",", "$", "expireSeconds", "=", "null", ")", "{", "if", "(", "is_int", "(", "$", "sceneValue", ")", "&&", "$", "sceneValue", ">", "0", ")", "{", "$", "type", "=", "self", "::", "SCENE_QR_TEMPOR...
Create temporary QR code. @param string|int $sceneValue @param int|null $expireSeconds @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Create", "temporary", "QR", "code", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/BasicService/QrCode/Client.php#L65-L77
208,087
overtrue/wechat
src/Work/Media/Client.php
Client.upload
public function upload(string $type, string $path) { $files = [ 'media' => $path, ]; return $this->httpUpload('cgi-bin/media/upload', $files, [], compact('type')); }
php
public function upload(string $type, string $path) { $files = [ 'media' => $path, ]; return $this->httpUpload('cgi-bin/media/upload', $files, [], compact('type')); }
[ "public", "function", "upload", "(", "string", "$", "type", ",", "string", "$", "path", ")", "{", "$", "files", "=", "[", "'media'", "=>", "$", "path", ",", "]", ";", "return", "$", "this", "->", "httpUpload", "(", "'cgi-bin/media/upload'", ",", "$", ...
Upload media. @param string $type @param string $path @return mixed
[ "Upload", "media", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Work/Media/Client.php#L102-L109
208,088
overtrue/wechat
src/MiniProgram/AppCode/Client.php
Client.get
public function get(string $path, array $optional = []) { $params = array_merge([ 'path' => $path, ], $optional); return $this->getStream('wxa/getwxacode', $params); }
php
public function get(string $path, array $optional = []) { $params = array_merge([ 'path' => $path, ], $optional); return $this->getStream('wxa/getwxacode', $params); }
[ "public", "function", "get", "(", "string", "$", "path", ",", "array", "$", "optional", "=", "[", "]", ")", "{", "$", "params", "=", "array_merge", "(", "[", "'path'", "=>", "$", "path", ",", "]", ",", "$", "optional", ")", ";", "return", "$", "t...
Get AppCode. @param string $path @param array $optional @return \EasyWeChat\Kernel\Http\StreamResponse
[ "Get", "AppCode", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/MiniProgram/AppCode/Client.php#L32-L39
208,089
overtrue/wechat
src/MiniProgram/AppCode/Client.php
Client.getUnlimit
public function getUnlimit(string $scene, array $optional = []) { $params = array_merge([ 'scene' => $scene, ], $optional); return $this->getStream('wxa/getwxacodeunlimit', $params); }
php
public function getUnlimit(string $scene, array $optional = []) { $params = array_merge([ 'scene' => $scene, ], $optional); return $this->getStream('wxa/getwxacodeunlimit', $params); }
[ "public", "function", "getUnlimit", "(", "string", "$", "scene", ",", "array", "$", "optional", "=", "[", "]", ")", "{", "$", "params", "=", "array_merge", "(", "[", "'scene'", "=>", "$", "scene", ",", "]", ",", "$", "optional", ")", ";", "return", ...
Get AppCode unlimit. @param string $scene @param array $optional @return \EasyWeChat\Kernel\Http\StreamResponse
[ "Get", "AppCode", "unlimit", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/MiniProgram/AppCode/Client.php#L49-L56
208,090
overtrue/wechat
src/MiniProgram/AppCode/Client.php
Client.getStream
protected function getStream(string $endpoint, array $params) { $response = $this->requestRaw($endpoint, 'POST', ['json' => $params]); if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) { return StreamResponse::buildFromPsrResponse($response); ...
php
protected function getStream(string $endpoint, array $params) { $response = $this->requestRaw($endpoint, 'POST', ['json' => $params]); if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) { return StreamResponse::buildFromPsrResponse($response); ...
[ "protected", "function", "getStream", "(", "string", "$", "endpoint", ",", "array", "$", "params", ")", "{", "$", "response", "=", "$", "this", "->", "requestRaw", "(", "$", "endpoint", ",", "'POST'", ",", "[", "'json'", "=>", "$", "params", "]", ")", ...
Get stream. @param string $endpoint @param array $params @return \EasyWeChat\Kernel\Http\StreamResponse
[ "Get", "stream", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/MiniProgram/AppCode/Client.php#L79-L88
208,091
overtrue/wechat
src/Payment/Transfer/Client.php
Client.queryBalanceOrder
public function queryBalanceOrder(string $partnerTradeNo) { $params = [ 'appid' => $this->app['config']->app_id, 'mch_id' => $this->app['config']->mch_id, 'partner_trade_no' => $partnerTradeNo, ]; return $this->safeRequest('mmpaymkttransfers/gettransferin...
php
public function queryBalanceOrder(string $partnerTradeNo) { $params = [ 'appid' => $this->app['config']->app_id, 'mch_id' => $this->app['config']->mch_id, 'partner_trade_no' => $partnerTradeNo, ]; return $this->safeRequest('mmpaymkttransfers/gettransferin...
[ "public", "function", "queryBalanceOrder", "(", "string", "$", "partnerTradeNo", ")", "{", "$", "params", "=", "[", "'appid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "->", "app_id", ",", "'mch_id'", "=>", "$", "this", "->", "app", "[", "...
Query MerchantPay to balance. @param string $partnerTradeNo @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Query", "MerchantPay", "to", "balance", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Transfer/Client.php#L35-L44
208,092
overtrue/wechat
src/Payment/Transfer/Client.php
Client.toBalance
public function toBalance(array $params) { $base = [ 'mch_id' => null, 'mchid' => $this->app['config']->mch_id, 'mch_appid' => $this->app['config']->app_id, ]; if (empty($params['spbill_create_ip'])) { $params['spbill_create_ip'] = get_server_...
php
public function toBalance(array $params) { $base = [ 'mch_id' => null, 'mchid' => $this->app['config']->mch_id, 'mch_appid' => $this->app['config']->app_id, ]; if (empty($params['spbill_create_ip'])) { $params['spbill_create_ip'] = get_server_...
[ "public", "function", "toBalance", "(", "array", "$", "params", ")", "{", "$", "base", "=", "[", "'mch_id'", "=>", "null", ",", "'mchid'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "->", "mch_id", ",", "'mch_appid'", "=>", "$", "this", "-...
Send MerchantPay to balance. @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Send", "MerchantPay", "to", "balance", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Transfer/Client.php#L55-L68
208,093
overtrue/wechat
src/Payment/Transfer/Client.php
Client.queryBankCardOrder
public function queryBankCardOrder(string $partnerTradeNo) { $params = [ 'mch_id' => $this->app['config']->mch_id, 'partner_trade_no' => $partnerTradeNo, ]; return $this->safeRequest('mmpaysptrans/query_bank', $params); }
php
public function queryBankCardOrder(string $partnerTradeNo) { $params = [ 'mch_id' => $this->app['config']->mch_id, 'partner_trade_no' => $partnerTradeNo, ]; return $this->safeRequest('mmpaysptrans/query_bank', $params); }
[ "public", "function", "queryBankCardOrder", "(", "string", "$", "partnerTradeNo", ")", "{", "$", "params", "=", "[", "'mch_id'", "=>", "$", "this", "->", "app", "[", "'config'", "]", "->", "mch_id", ",", "'partner_trade_no'", "=>", "$", "partnerTradeNo", ","...
Query MerchantPay order to BankCard. @param string $partnerTradeNo @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Query", "MerchantPay", "order", "to", "BankCard", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Transfer/Client.php#L79-L87
208,094
overtrue/wechat
src/Payment/Transfer/Client.php
Client.toBankCard
public function toBankCard(array $params) { foreach (['bank_code', 'partner_trade_no', 'enc_bank_no', 'enc_true_name', 'amount'] as $key) { if (empty($params[$key])) { throw new RuntimeException(\sprintf('"%s" is required.', $key)); } } $publicKey = f...
php
public function toBankCard(array $params) { foreach (['bank_code', 'partner_trade_no', 'enc_bank_no', 'enc_true_name', 'amount'] as $key) { if (empty($params[$key])) { throw new RuntimeException(\sprintf('"%s" is required.', $key)); } } $publicKey = f...
[ "public", "function", "toBankCard", "(", "array", "$", "params", ")", "{", "foreach", "(", "[", "'bank_code'", ",", "'partner_trade_no'", ",", "'enc_bank_no'", ",", "'enc_true_name'", ",", "'amount'", "]", "as", "$", "key", ")", "{", "if", "(", "empty", "(...
Send MerchantPay to BankCard. @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException @throws \EasyWeChat\Kernel\Exceptions\RuntimeException
[ "Send", "MerchantPay", "to", "BankCard", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Transfer/Client.php#L99-L113
208,095
overtrue/wechat
src/Kernel/Encryptor.php
Encryptor.encrypt
public function encrypt($xml, $nonce = null, $timestamp = null): string { try { $xml = $this->pkcs7Pad(str_random(16).pack('N', strlen($xml)).$xml.$this->appId, $this->blockSize); $encrypted = base64_encode(AES::encrypt( $xml, $this->aesKey, ...
php
public function encrypt($xml, $nonce = null, $timestamp = null): string { try { $xml = $this->pkcs7Pad(str_random(16).pack('N', strlen($xml)).$xml.$this->appId, $this->blockSize); $encrypted = base64_encode(AES::encrypt( $xml, $this->aesKey, ...
[ "public", "function", "encrypt", "(", "$", "xml", ",", "$", "nonce", "=", "null", ",", "$", "timestamp", "=", "null", ")", ":", "string", "{", "try", "{", "$", "xml", "=", "$", "this", "->", "pkcs7Pad", "(", "str_random", "(", "16", ")", ".", "pa...
Encrypt the message and return XML. @param string $xml @param string $nonce @param int $timestamp @return string @throws \EasyWeChat\Kernel\Exceptions\RuntimeException
[ "Encrypt", "the", "message", "and", "return", "XML", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Kernel/Encryptor.php#L101-L130
208,096
overtrue/wechat
src/MiniProgram/NearbyPoi/Client.php
Client.add
public function add(string $name, string $credential, string $address, string $proofMaterial = null) { return $this->httpPostJson('wxa/addnearbypoi', [ 'related_name' => $name, 'related_credential' => $credential, 'related_address' => $address, 'related_proof_...
php
public function add(string $name, string $credential, string $address, string $proofMaterial = null) { return $this->httpPostJson('wxa/addnearbypoi', [ 'related_name' => $name, 'related_credential' => $credential, 'related_address' => $address, 'related_proof_...
[ "public", "function", "add", "(", "string", "$", "name", ",", "string", "$", "credential", ",", "string", "$", "address", ",", "string", "$", "proofMaterial", "=", "null", ")", "{", "return", "$", "this", "->", "httpPostJson", "(", "'wxa/addnearbypoi'", ",...
Add nearby poi. @param string $name @param string $credential @param string $address @param string $proofMaterial @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Add", "nearby", "poi", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/MiniProgram/NearbyPoi/Client.php#L34-L42
208,097
overtrue/wechat
src/MiniProgram/NearbyPoi/Client.php
Client.setVisibility
public function setVisibility(string $poiId, int $status) { if (!in_array($status, [0, 1], true)) { throw new InvalidArgumentException('status should be 0 or 1.'); } return $this->httpPostJson('wxa/setnearbypoishowstatus', [ 'poi_id' => $poiId, 'status' =...
php
public function setVisibility(string $poiId, int $status) { if (!in_array($status, [0, 1], true)) { throw new InvalidArgumentException('status should be 0 or 1.'); } return $this->httpPostJson('wxa/setnearbypoishowstatus', [ 'poi_id' => $poiId, 'status' =...
[ "public", "function", "setVisibility", "(", "string", "$", "poiId", ",", "int", "$", "status", ")", "{", "if", "(", "!", "in_array", "(", "$", "status", ",", "[", "0", ",", "1", "]", ",", "true", ")", ")", "{", "throw", "new", "InvalidArgumentExcepti...
Set nearby poi show status. @param string $poiId @param int $status @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
[ "Set", "nearby", "poi", "show", "status", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/MiniProgram/NearbyPoi/Client.php#L82-L92
208,098
overtrue/wechat
src/Payment/Base/Client.php
Client.pay
public function pay(array $params) { $params['appid'] = $this->app['config']->app_id; return $this->request($this->wrap('pay/micropay'), $params); }
php
public function pay(array $params) { $params['appid'] = $this->app['config']->app_id; return $this->request($this->wrap('pay/micropay'), $params); }
[ "public", "function", "pay", "(", "array", "$", "params", ")", "{", "$", "params", "[", "'appid'", "]", "=", "$", "this", "->", "app", "[", "'config'", "]", "->", "app_id", ";", "return", "$", "this", "->", "request", "(", "$", "this", "->", "wrap"...
Pay the order. @param array $params @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
[ "Pay", "the", "order", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Base/Client.php#L27-L32
208,099
overtrue/wechat
src/Payment/Notify/Handler.php
Handler.toResponse
public function toResponse(): Response { $base = [ 'return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL, 'return_msg' => $this->fail, ]; $attributes = array_merge($base, $this->attributes); if ($this->sign) { $attributes['sign']...
php
public function toResponse(): Response { $base = [ 'return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL, 'return_msg' => $this->fail, ]; $attributes = array_merge($base, $this->attributes); if ($this->sign) { $attributes['sign']...
[ "public", "function", "toResponse", "(", ")", ":", "Response", "{", "$", "base", "=", "[", "'return_code'", "=>", "is_null", "(", "$", "this", "->", "fail", ")", "?", "static", "::", "SUCCESS", ":", "static", "::", "FAIL", ",", "'return_msg'", "=>", "$...
Build xml and return the response to WeChat. @return \Symfony\Component\HttpFoundation\Response
[ "Build", "xml", "and", "return", "the", "response", "to", "WeChat", "." ]
120c72faaa93c270365bc75c73c362d5fd583209
https://github.com/overtrue/wechat/blob/120c72faaa93c270365bc75c73c362d5fd583209/src/Payment/Notify/Handler.php#L105-L119