// Add some locations $shire = new Node('locations'); $shire->commit(array('name' => 'The Shire')); $bilbo->link($shire); $bree = new Node('locations'); $bree->commit(array('name' => 'Bree')); $mirkwood = new Node('locations'); $mirkwood->commit(array('name' => 'Mirkwood')); // Link the locations together, with directions for the preferred travel route $shire->link($bree, array('direction' => 'forward')); $bree->link($mirkwood, array('direction' => 'forward', 'label' => 'DANGEROUS')); // Get the next location from the $shire $next_stop = $shire->locations('dir:forward'); // Get all DANGEROUS paths joining $bree $hazards = $bree->locations('rel:DANGEROUS'); // Destroy a node MeshTools::DeleteNode($the_ring);