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

            return $ptr;
        }

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

            return $ptr;
        }

        return null;
    }
public function getScopePointer ( $ scope ) { if ( $ scope == Smarty :: SCOPE_PARENT && ! empty ( $ this -> parent ) ) { return $ this -> parent ; } elseif ( $ scope == Smarty :: SCOPE_ROOT && ! empty ( $ this -> parent ) ) { $ ptr = $ this -> parent ; while ( ! empty ( $ ptr -> parent ) ) { $ ptr = $ ptr -> parent ; } return $ ptr ; } return null ; }
Get parent or root of template parent chain

@param  int   $scope pqrent or root scope
@return mixed object
Get parent or root of template parent chain