當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。