/** * Calculate's the "size" of a node in the hierachical * structure, based off it's left and right limits. * * @param Cartalyst\NestedSets\Nodes\NodeInterface $node * @return int */ public function getNodeSize(NodeInterface $node) { return $node->getAttribute($node->getReservedAttributeName('right')) - $node->getAttribute($node->getReservedAttributeName('left')); }
/** * Get the name of a reserved attribute. * * @param string $key * @return string */ public function getReservedAttributeName($key) { return $this->baseNode->getReservedAttributeName($key); }