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


PHP Relationship::setProperties方法代码示例

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


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

示例1: inflateFromResponse

 public static function inflateFromResponse($db, $response)
 {
     $start_path = explode("/", $response['start']);
     $end_path = explode("/", $response['end']);
     $self_path = explode("/", $response['self']);
     $start = $db->getNodeById(end($start_path));
     $end = $db->getNodeById(end($end_path));
     $relationship = new Relationship($db, $start, $end, $response['type']);
     $relationship->_is_new = false;
     $relationship->_id = end($self_path);
     $relationship->setProperties($response['data']);
     return $relationship;
 }
开发者ID:nightchiller,项目名称:pneo4j,代码行数:13,代码来源:Relationship.php

示例2: populateRelationship

 /**
  * Fill a relationship with data
  *
  * @param Relationship $rel
  * @param array $data
  * @return Relationship
  */
 public function populateRelationship(Relationship $rel, $data)
 {
     $rel->useLazyLoad(false);
     $rel->setProperties($data['data']);
     $rel->setType($data['type']);
     $rel->setStartNode($this->getNodeFromUri($data['start']));
     $rel->setEndNode($this->getNodeFromUri($data['end']));
     return $rel;
 }
开发者ID:pin-cnx,项目名称:orientdb-php,代码行数:16,代码来源:EntityMapper.php

示例3: loadRelationship

 /**
  * Load the given relationship with data from the server
  *
  * @param Relationship $rel
  * @return boolean
  */
 public function loadRelationship(Relationship $rel)
 {
     $cached = $this->getEntityCache()->getCachedEntity($rel->getId(), 'relationship');
     if ($cached) {
         $rel->setProperties($cached->getProperties());
         return true;
     }
     return $this->runCommand(new Command\GetRelationship($this, $rel));
 }
开发者ID:BobLuo,项目名称:Neo4j,代码行数:15,代码来源:Client.php

示例4: inflateFromResponse

 public static function inflateFromResponse(GraphDatabaseService $neo_db, array $response)
 {
     $start_id = end(explode("/", $response['start']));
     $end_id = end(explode("/", $response['end']));
     $start = $neo_db->getNodeById($start_id);
     $end = $neo_db->getNodeById($end_id);
     $relationship = new Relationship($neo_db, $start, $end, $response['type']);
     $relationship->_is_new = FALSE;
     $relationship->_id = end(explode("/", $response['self']));
     $relationship->setProperties($response['data']);
     return $relationship;
 }
开发者ID:electric-al,项目名称:Neo4J-REST-PHP-API-client,代码行数:12,代码来源:php-neo-rest.php


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