Пример #1
0
 public static function getByNodeId($id)
 {
     $node = Neo4jClient::client()->getNode($id);
     $content = new Content();
     $content->id = $node->getId();
     $content->title = $node->getProperty('title');
     $content->url = $node->getProperty('url');
     $content->url = $node->getProperty('tags');
     $content->node = $node;
     return $content;
 }
Пример #2
0
 /**
  * Gets a User by node id
  *
  * @param  int|string $id Node id
  * @return User
  */
 public static function getByNodeId($id)
 {
     return self::fromNode(Neo4jClient::client()->getNode($id));
 }
Пример #3
0
 /**
  * @group unit
  */
 public function testSetClient()
 {
     $client = $this->getMockClient();
     Neo4jClient::setClient($client);
     $this->assertSame($client, Neo4jClient::client());
 }
Пример #4
0
 /**
  * Get content by node id
  *
  * @param  int     $id Node id
  * @return Content
  */
 public static function getByNodeId($id)
 {
     $node = Neo4jClient::client()->getNode($id);
     return self::createFromNode($node);
 }