PHP code example of syndesi / cypher-data-structures
1. Go to this page and download the library: Download syndesi/cypher-data-structures library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
syndesi / cypher-data-structures example snippets
use Syndesi\CypherDataStructures\Type\Node;
use Syndesi\CypherDataStructures\Type\Relation;
$node = new Node();
$node
->addLabel('NodeLabel')
->addIdentifier('id', 123)
->addProperty('someProperty', 'someValue')
->addIdentifier('id');
$otherNode = new Node();
$otherNode
->addLabel('OtherNodeLabel')
->addIdentifier('id', 234)
->addProperty('hello', 'world :D')
->addIdentifier('id');
$relation = new Relation();
$relation
->setStartNode($node)
->setEndNode($node)
->setType('SOME_RELATION');