本文整理汇总了PHP中client::send方法的典型用法代码示例。如果您正苦于以下问题:PHP client::send方法的具体用法?PHP client::send怎么用?PHP client::send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类client
的用法示例。
在下文中一共展示了client::send方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: send
/**
* make the call to the API
*
* @param Request
* @return Response
*/
public function send($request)
{
try {
# if it was successful, return the response
return $this->client->send($request)->json();
} catch (\GuzzleHttp\Exception\ClientException $e) {
# if it was unsuccessful then return the error that was thrown
return $e->getResponse();
}
}
示例2:
<?php
echo 'Здравствуйте, ваш внутрений номер ' . $_SESSION['operator'];
echo '<br>почтовый адрес ' . $_SESSION['email'];
if (isset($_POST['startcall']) && $_POST['number'] > 0) {
$number = $_POST['number'];
if (!$operator == 100) {
client::call($number);
} else {
$op = $_POST['extension'];
client::callop($number, $op);
}
}
if (isset($_POST['send']) && $_POST['number'] > 0) {
$number = $_POST['number'];
client::send($number);
}
if (isset($_POST['comment']) && $_POST['number'] > 0) {
$number = $_POST['number'];
$comment = $_POST['comment_text'];
client::comment($number, $comment);
}
list($list, $pagination, $rows) = client::find($_GET['search'], $operator);
?>
</div>
</div>
<div class="row">
<div class="col-xs-12 ">
<table class="table table-hover table-condensed table-striped table-bordered">