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


PHP Relationship::inflateFromResponse方法代码示例

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


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

示例1: getRelationships

 public function getRelationships($direction = Relationship::DIRECTION_BOTH, $types = NULL)
 {
     $uri = $this->getUri() . '/relationships';
     switch ($direction) {
         case Relationship::DIRECTION_IN:
             $uri .= '/in';
             break;
         case Relationship::DIRECTION_OUT:
             $uri .= '/out';
             break;
         default:
             $uri .= '/all';
     }
     if ($types) {
         if (is_array($types)) {
             $types = implode("&", $types);
         }
         $uri .= '/' . $types;
     }
     list($response, $http_code) = HTTPUtil::jsonGetRequest($uri);
     $relationships = array();
     foreach ($response as $result) {
         $relationships[] = Relationship::inflateFromResponse($this->_neo_db, $result);
     }
     return $relationships;
 }
开发者ID:hasantayyar,项目名称:Neo4J-PHP-client,代码行数:26,代码来源:neo4j.class.php

示例2: getRelationshipByUri

 /**
  * get relationship by uri
  *
  * @throws \Neo4j\Exception\NotFoundException
  * @throws \Neo4j\Exception\HttpException
  * @param string $uri
  * @return Neo4j\Relationship
  */
 public function getRelationshipByUri($uri)
 {
     list($response, $http_code) = Request::get($uri);
     if ($http_code == 404) {
         throw new \Neo4j\Exception\NotFoundException();
     }
     if ($http_code != 200) {
         throw new \Neo4j\Exception\HttpException("http code: " . $http_code . ", response: " . print_r($response, true));
     }
     return Relationship::inflateFromResponse($this, $response);
 }
开发者ID:nightchiller,项目名称:pneo4j,代码行数:19,代码来源:Database.php

示例3: getRelationships

 /**
  * get relationships of node and filtered by directions and types
  *
  * @param string $direction
  * @param array|null $types
  * @return array
  */
 public function getRelationships($direction = Database::DIRECTION_BOTH, $types = NULL)
 {
     $uri = $this->getUri() . '/relationships';
     switch ($direction) {
         case Database::DIRECTION_INCOMING:
             $uri .= '/' . Database::DIRECTION_INCOMING;
             break;
         case Database::DIRECTION_OUTGOING:
             $uri .= '/' . Database::DIRECTION_OUTGOING;
             break;
         default:
             $uri .= '/' . Database::DIRECTION_BOTH;
     }
     if ($types) {
         if (is_array($types)) {
             $types = implode("&", $types);
         }
         $uri .= '/' . $types;
     }
     list($response, $http_code) = Request::get($uri);
     $relationships = array();
     foreach ($response as $result) {
         $relationships[] = Relationship::inflateFromResponse($this->_db, $result);
     }
     return $relationships;
 }
开发者ID:nightchiller,项目名称:pneo4j,代码行数:33,代码来源:Node.php


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