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; }
/** * 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)); }
/** * @group unit */ public function testSetClient() { $client = $this->getMockClient(); Neo4jClient::setClient($client); $this->assertSame($client, Neo4jClient::client()); }
/** * 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); }