public function getScopePointer($scope)
{
if ($scope == Brainy::SCOPE_PARENT && !empty($this->parent)) {
return $this->parent;
}
if ($scope == Brainy::SCOPE_ROOT && !empty($this->parent)) {
$ptr = $this->parent;
while (!empty($ptr->parent)) {
$ptr = $ptr->parent;
}
return $ptr;
}
return null;
}