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

            return $ptr->tpl_vars;
        } elseif ($scope == Smarty::SCOPE_GLOBAL) {
            return Smarty::$global_tpl_vars;
        }
        $null = null;

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

            return $ptr->tpl_vars;
        } elseif ($scope == Smarty::SCOPE_GLOBAL) {
            return Smarty::$global_tpl_vars;
        }
        $null = null;

        return $null;
    }
public function & getScope ( $ scope ) { if ( $ scope == Smarty :: SCOPE_PARENT && ! empty ( $ this -> parent ) ) { return $ this -> parent -> tpl_vars ; } elseif ( $ scope == Smarty :: SCOPE_ROOT && ! empty ( $ this -> parent ) ) { $ ptr = $ this -> parent ; while ( ! empty ( $ ptr -> parent ) ) { $ ptr = $ ptr -> parent ; } return $ ptr -> tpl_vars ; } elseif ( $ scope == Smarty :: SCOPE_GLOBAL ) { return Smarty :: $ global_tpl_vars ; } $ null = null ; return $ null ; }
Template code runtime function to get pointer to template variable array of requested scope

@param  int   $scope requested variable scope
@return array array of template variables
Template code runtime function to get pointer to template variable array of requested scope