Baum\SetBuilder::scopedAttributes PHP Method

scopedAttributes() protected method

Return an array of the scoped attributes of the supplied node.
protected scopedAttributes ( Baum\Node $node ) : array
$node Baum\Node
return array
    protected function scopedAttributes($node)
    {
        $keys = $this->node->getScopedColumns();
        if (count($keys) == 0) {
            return [];
        }
        $values = array_map(function ($column) use($node) {
            return $node->getAttribute($column);
        }, $keys);
        return array_combine($keys, $values);
    }