Baum\SetBuilder::scopedKey PHP Method

scopedKey() protected method

Return a string-key for the current scoped attributes. Used for index computing when a scope is defined (acsts as an scope identifier).
protected scopedKey ( Baum\Node $node ) : string
$node Baum\Node
return string
    protected function scopedKey($node)
    {
        $attributes = $this->scopedAttributes($node);
        $output = [];
        foreach ($attributes as $fld => $value) {
            $output[] = $this->qualify($fld) . '=' . (is_null($value) ? 'NULL' : $value);
        }
        // NOTE: Maybe an md5 or something would be better. Should be unique though.
        return implode(',', $output);
    }