public function getNodesByLabel($name, $labelizedKeys = false)
    {
        $collection = array();
        foreach ($this->getNodes() as $node) {
            if ($node->hasLabel($name)) {
                if ($labelizedKeys) {
                    $collection[$name] = $node;
                } else {
                    $collection[] = $node;
                }
            }
        }

        return $collection;
    }
public function getNodesByLabel($name, $labelizedKeys = false)
    {
        $collection = array();
        foreach ($this->getNodes() as $node) {
            if ($node->hasLabel($name)) {
                if ($labelizedKeys) {
                    $collection[$name] = $node;
                } else {
                    $collection[] = $node;
                }
            }
        }

        return $collection;
    }
public function getNodesByLabel ( $ name , $ labelizedKeys = false ) { $ collection = array ( ) ; foreach ( $ this -> getNodes ( ) as $ node ) { if ( $ node -> hasLabel ( $ name ) ) { if ( $ labelizedKeys ) { $ collection [ $ name ] = $ node ; } else { $ collection [ ] = $ node ; } } } return $ collection ; }
Returns all nodes with the given label.

@param string $name
@param bool   $labelizedKeys When true, the results are indexed by node
label. Assumes only one node per label.

@return Node[]
Returns all nodes with the given label .