當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Factory::getGeneric方法代碼示例

本文整理匯總了PHP中Factory::getGeneric方法的典型用法代碼示例。如果您正苦於以下問題:PHP Factory::getGeneric方法的具體用法?PHP Factory::getGeneric怎麽用?PHP Factory::getGeneric使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Factory的用法示例。


在下文中一共展示了Factory::getGeneric方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getInfo

 /**
  * Get info for the current graph
  * 
  * @return array
  */
 public function getInfo()
 {
     $response = $this->makeRequest('GET');
     return Factory::getGeneric($this, $response);
 }
開發者ID:atomicjets,項目名稱:PHP-Rexster,代碼行數:10,代碼來源:Graph.php

示例2: putCustom

 /**
  * Performs a PUT request to a custom endpoint with payload $data
  * 
  * @param string $url
  * @param array $data
  * @throws \InvalidArgumentException
  * @throws \RuntimeException
  * @return Ambigous <boolean, \Rexster\Object>
  */
 public function putCustom($url, array $data = array())
 {
     if (empty($url)) {
         throw new \InvalidArgumentException('Invalid URL');
     }
     $response = $this->makeRequest('PUT', "/{$url}", $data);
     if (!$response) {
         throw new \RuntimeException($this->getLastErrorMessage());
     }
     return Factory::getGeneric($this, $response);
 }
開發者ID:atomicjets,項目名稱:PHP-Rexster,代碼行數:20,代碼來源:Client.php

示例3: getBothDirectionVertexIds

 public function getBothDirectionVertexIds()
 {
     if (empty($this->id)) {
         throw new \InvalidArgumentException("Invalid vertex id");
     }
     $response = $this->getClient()->makeRequest('GET', $this->getPath() . '/' . $this->getId() . '/bothIds');
     return Factory::getGeneric($this->getClient(), $response);
 }
開發者ID:atomicjets,項目名稱:PHP-Rexster,代碼行數:8,代碼來源:Vertex.php

示例4: delete

 public function delete(array $properties = array())
 {
     if (empty($this->id)) {
         throw new \InvalidArgumentException('Invalid object id to update');
     }
     if ($this->id != $this->_id) {
         throw new \InvalidArgumentException("Node ID's do not match? this->_id = {$this->_id} -- this->id = {$this->id}");
     }
     $url = '/' . $this->getPath() . '/' . $this->getId();
     if (!empty($properties)) {
         $tmp = array();
         foreach ($properties as $property) {
             $tmp[$property] = $property;
         }
         unset($properties);
         $properties = $tmp;
     }
     $response = $this->getClient()->makeRequest("DELETE", $url, $properties);
     return Factory::getGeneric($this->getClient(), $response);
 }
開發者ID:atomicjets,項目名稱:PHP-Rexster,代碼行數:20,代碼來源:Object.php


注:本文中的Factory::getGeneric方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。