Neoxygen\NeoClient\Formatter\Result::getSingleNodeByLabel PHP 메소드

getSingleNodeByLabel() 공개 메소드

Returns a single node for a given label.
public getSingleNodeByLabel ( string $label ) : Neoxygen\NeoClient\Formatter\Node | null
$label string The label to match for
리턴 Neoxygen\NeoClient\Formatter\Node | null The Node or null if not node found matching the label
    public function getSingleNodeByLabel($label)
    {
        foreach ($this->nodes as $node) {
            if ($node->hasLabel($label)) {
                return $node;
            }
        }
        return;
    }