diff --git a/view/SSViewer.php b/view/SSViewer.php index 5c1317d55..cac477c55 100644 --- a/view/SSViewer.php +++ b/view/SSViewer.php @@ -96,7 +96,19 @@ class SSViewer_Scope { $this->upIndex, $this->currentIndex); return $this; } - + + /** + * Gets the current object and resets the scope. + * + * @return object + */ + public function self() { + $result = $this->itemIterator ? $this->itemIterator->current() : $this->item; + $this->resetLocalScope(); + + return $result; + } + public function pushScope(){ $newLocalIndex = count($this->itemStack)-1;