当前位置: 首页>>代码示例>>PHP>>正文


PHP client::get方法代码示例

本文整理汇总了PHP中client::get方法的典型用法代码示例。如果您正苦于以下问题:PHP client::get方法的具体用法?PHP client::get怎么用?PHP client::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在client的用法示例。


在下文中一共展示了client::get方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fetch

 private function fetch()
 {
     $response = $this->httpClient->get($this->path, $this->parameters, $this->headers);
     $this->getPagination($response);
     $elements = json_decode($response->getBody());
     return $elements;
 }
开发者ID:hounddog,项目名称:hd-api-client,代码行数:7,代码来源:RepositoryCollection.php

示例2: generateUserInfo

 public function generateUserInfo()
 {
     $args = ['access_token' => $this->getAccessToken(), 'oauth_consumer_key' => $this->getAppKey(), 'openid' => $this->getOpenId()];
     $msg = client::get($this->getUrl('userinfo'), ['query' => $args])->json();
     if ($msg['ret'] !== 0) {
         throw new \LogicException(app::get('sysuser')->_('参数错误!'));
     }
     return $this->convertStandardUserInfo($msg);
 }
开发者ID:453111208,项目名称:bbc,代码行数:9,代码来源:qq.php

示例3: generateUserInfo

 /**
  * 通过调用信任登陆相关用户接口生成用户info
  *
  * @param string $code
  * @return string
  */
 public function generateUserInfo()
 {
     $args = ['access_token' => $this->getAccessToken()];
     $msg = client::get($this->getUrl('userinfo'), ['query' => $args])->json();
     if ($msg['error']) {
         throw new \LogicException("error :" . $msg['error_code'] . "msg  :" . $msg['error']);
     }
     return $this->convertStandardUserInfo($msg);
 }
开发者ID:453111208,项目名称:bbc,代码行数:15,代码来源:kaixin.php

示例4: getCoordinatesForQuery

 /**
  *
  * Get the coordinates for a query
  *
  * @param string $query
  * @return array
  * @throws \Exception
  */
 public function getCoordinatesForQuery($query)
 {
     if ($query == '') {
         return false;
     }
     $request = $this->client->get('http://maps.googleapis.com/maps/api/geocode/json');
     $request->getQuery()->set('address', $query)->set('sensor', 'false');
     $response = $request->send();
     if ($response->getStatusCode() != 200) {
         throw new \Exception('could not connect to googleapis.com/maps/api');
     }
     $fullResponse = $response->json();
     if (count($fullResponse['results'])) {
         $geocoderResult = ['lat' => $fullResponse['results'][0]['geometry']['location']['lat'], 'lng' => $fullResponse['results'][0]['geometry']['location']['lng'], 'accuracy' => $fullResponse['results'][0]['geometry']['location_type']];
     } else {
         $geocoderResult = ['lat' => 0, 'lng' => 0, 'accuracy' => self::RESULT_NOT_FOUND];
     }
     return $geocoderResult;
 }
开发者ID:mohamedsharaf,项目名称:geocoder,代码行数:27,代码来源:Geocoder.php

示例5: download

 static function download($ver)
 {
     $url = 'http://sitecake.com/dl/upgrade/sitecake-' . $ver . '-upgrade.zip';
     $resp = client::get($url);
     if ($resp->isSuccess()) {
         $file = TEMP_DIR . '/' . 'sitecake-' . $ver . '-upgrade.zip';
         io::file_put_contents($file, $resp->getBody());
         return $file;
     } else {
         return array('status' => -1, 'errorMessage' => 'Unable to download upgrade from ' . $url);
     }
 }
开发者ID:anpone,项目名称:sitecake,代码行数:12,代码来源:upgrade.php

示例6: index

 /**
  * Display a listing of the resource.
  * GET /clients
  *
  * @return Response
  */
 public function index()
 {
     return Response::json($this->client->get());
 }
开发者ID:sonoftheweb,项目名称:laravel-angularjs-boilerplate,代码行数:10,代码来源:ClientsController.php

示例7: escalateSend

 static function escalateSend($parent, $param, $fullmess)
 {
     global $gbl, $sgbl, $login, $ghtml;
     $action = 'escalate';
     $obj = new client(null, null, 'admin');
     $obj->get();
     $extra = null;
     $from = "helpdesk";
     if ($sgbl->__var_program_name === 'lxlabsclient') {
         $ip = "lxlabs.com";
         if ($parent->isOn('escalate')) {
             $extra .= "X-escalate: Escalated\n";
         }
         /*
         	if ($parent->used->vps_num > 100) {
         		$subject = "P:100: $subject";
         	} else if ($parent->used->vps_num > 50) {
         		$subject = "P:50: $subject";
         	} else {
         		$subject = "P:10: $subject";
         	}
         */
     } else {
         $ip = getFQDNforServer('localhost');
     }
     $pass = $parent->realpass;
     $ticktid = $parent->nname;
     $extram = base64_encode(serialize(array('ticket_c' => $obj->getClName())));
     $urllink = "Click here to login to the Ticket: http://{$ip}:{$sgbl->__var_prog_port}/htmllib/phplib/?frm_clientname={$ticktid}&frm_class=ticket&frm_password={$pass}";
     $actxt = "has been escalated";
     $extra = "Message-ID: {$parent->mail_messageid}\n";
     $message = $fullmess;
     ticketHistory::ticketSendNotification($from, $parent->nname, $category, $obj, $action, $actxt, $param['made_by'], $parent->subject, $message, $extra);
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:34,代码来源:tickethistorylib.php

示例8:

<?php

include 'template/blankStart.php';
include_once '../model/profiles/client.php';
?>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title"> </h3>
            </div>
            <div class="panel-body">
                <?php 
$client = client::get($_GET['client']);
echo "<h1>নাম :{$_GET['client']}</h1><br>";
echo "<h1>ফোন :{$client['address']}</h1><br>";
echo "<h1>ফোন :{$client['phone']}</h1><br>";
echo "<h1>ফোন :{$client['email']}</h1><br>";
?>
            </div>
        </div>
    </div>
</div>


<?php 
include 'template/blankEnd.php';
开发者ID:n-sakib,项目名称:juierp,代码行数:27,代码来源:client_info.php


注:本文中的client::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。