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


PHP Relationship::setStartNode方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     $this->client = $this->getMock('Everyman\\Neo4j\\Client', array(), array(), '', false);
     $this->path = new Path($this->client);
     $rel = new Relationship($this->client);
     $rel->setStartNode(new Node($this->client));
     $rel->setEndNode(new Node($this->client));
     $this->path->appendRelationship($rel);
     $this->rels[0] = $rel;
     $rel = new Relationship($this->client);
     $rel->setStartNode(new Node($this->client));
     $rel->setEndNode(new Node($this->client));
     $this->path->appendRelationship($rel);
     $this->rels[1] = $rel;
     $node = new Node($this->client);
     $this->path->appendNode($node);
     $this->nodes[0] = $node;
     $node = new Node($this->client);
     $this->path->appendNode($node);
     $this->nodes[1] = $node;
     $node = new Node($this->client);
     $this->path->appendNode($node);
     $this->nodes[2] = $node;
     $node = new Node($this->client);
     $this->path->appendNode($node);
     $this->nodes[3] = $node;
 }
开发者ID:jadz,项目名称:neo4j-php,代码行数:27,代码来源:PathTest.php

示例2: testSaveRelationship_Create_NoType_ThrowsException

 public function testSaveRelationship_Create_NoType_ThrowsException()
 {
     $start = new Node($this->client);
     $start->setId(123);
     $end = new Node($this->client);
     $end->setId(456);
     $rel = new Relationship($this->client);
     $rel->setStartNode($start);
     $rel->setEndNode($end);
     $this->setExpectedException('Everyman\\Neo4j\\Exception');
     $this->client->saveRelationship($rel);
 }
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:12,代码来源:ClientTest.php

示例3: 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


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