Baum\Node::getScopedColumns PHP Method

getScopedColumns() public method

Get the column names which define our scope.
public getScopedColumns ( ) : array
return array
    public function getScopedColumns()
    {
        return (array) $this->scoped;
    }

Usage Example

示例#1
0
 /**
  * Return an array of the scoped attributes of the supplied node.
  *
  * @param   Baum\Node $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);
 }