getNodes() public method

Returns all nodes if called without arguments. Returns all nodes with the given labels if called with an array of labels. Otherwise, acts identically as {@link Result::getNodesByLabels()}.
public getNodes ( string | string[] | null $label = null, boolean $labelizedKeys = false ) : Neoxygen\NeoClient\Formatter\Node[]
$label string | string[] | null
$labelizedKeys boolean
return Neoxygen\NeoClient\Formatter\Node[]
 public function formatGraphResultAsComparableFormat(Result $graph)
 {
     $nodes = [];
     $relationships = [];
     foreach ($graph->getNodes() as $node) {
         $n = $this->formatNodeAsComparableFormat($node);
         $nodes[$n['sha']] = $n;
     }
     foreach ($graph->getRelationships() as $rel) {
         $r = $this->formatRelationshipAsComparableFormat($rel);
         $relationships[$r['sha']] = $r;
     }
     ksort($nodes);
     ksort($relationships);
     $format = ['nodes' => array_values($nodes), 'edges' => array_values($relationships)];
     return $format;
 }