protected static function getEdgeNodes(
        ParticleInterface $particle, 
        array $pack,
        string $name,
        Direction $direction,
        bool $singular = false 
        ): array
    {
        // $name = strtolower($name); // this is now taken care of beforehand.
        $direction = (string) $direction;
        $node_adj = static::ADJACENCY_EQUIVALENT[$direction]; // in->tail, out->head
        $cargo = $pack[$direction];
        $edges = $particle->edges()->$direction();
        $haystack = $singular ? "singularLabel_class_pairs" : "label_class_pairs";
        $return = [];
        array_walk(
            $edges, function ($item, $key) use (&$return, $name, $cargo, $node_adj, $haystack) {
                if($item instanceof $cargo->$haystack[$name]) {
                    $return[] = $item->$node_adj()->node();
                }
            }
        );
        return $return;
    }
protected static function getEdgeNodes(
        ParticleInterface $particle, 
        array $pack,
        string $name,
        Direction $direction,
        bool $singular = false 
        ): array
    {
        // $name = strtolower($name); // this is now taken care of beforehand.
        $direction = (string) $direction;
        $node_adj = static::ADJACENCY_EQUIVALENT[$direction]; // in->tail, out->head
        $cargo = $pack[$direction];
        $edges = $particle->edges()->$direction();
        $haystack = $singular ? "singularLabel_class_pairs" : "label_class_pairs";
        $return = [];
        array_walk(
            $edges, function ($item, $key) use (&$return, $name, $cargo, $node_adj, $haystack) {
                if($item instanceof $cargo->$haystack[$name]) {
                    $return[] = $item->$node_adj()->node();
                }
            }
        );
        return $return;
    }
protected static function getEdgeNodes ( ParticleInterface $ particle , array $ pack , string $ name , Direction $ direction , bool $ singular = false ) : array { // $name = strtolower($name); // this is now taken care of beforehand. $ direction = ( string ) $ direction ; $ node_adj = static :: ADJACENCY_EQUIVALENT [ $ direction ] ; // in->tail, out->head $ cargo = $ pack [ $ direction ] ; $ edges = $ particle -> edges ( ) -> $ direction ( ) ; $ haystack = $ singular ? "singularLabel_class_pairs" : "label_class_pairs" ; $ return = [ ] ; array_walk ( $ edges , function ( $ item , $ key ) use ( & $ return , $ name , $ cargo , $ node_adj , $ haystack ) { if ( $ item instanceof $ cargo -> $ haystack [ $ name ] ) { $ return [ ] = $ item -> $ node_adj ( ) -> node ( ) ; } } ) ; return $ return ; }
Getter Catcher for Edges In and Out

@param ParticleInterface $particle The particle that this handler is associated with.
@param array  $pack Holds cargo variables extracted by loaders.
@param string $name The edge node label in plural.
@param Direction  $direction The direction of the edge adjacent nodes to look up.
@param bool  $singular Is this for a singular call

@return array The edge nodes.
Getter Catcher for Edges In and Out