mirror of
				https://github.com/Mibew/handlebars.php.git
				synced 2025-11-04 04:05:07 +03:00 
			
		
		
		
	Added getCurrentTokenTree to get a token's tree within a helper
This commit is contained in:
		
							parent
							
								
									e863d7af80
								
							
						
					
					
						commit
						9eb7f952d2
					
				@ -128,6 +128,18 @@ class Template
 | 
			
		||||
        return $topStack[2];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the current token's tree
 | 
			
		||||
     *
 | 
			
		||||
     * @return array
 | 
			
		||||
     */
 | 
			
		||||
    public function getCurrentTokenTree()
 | 
			
		||||
    {
 | 
			
		||||
        $topStack = end($this->_stack);
 | 
			
		||||
 | 
			
		||||
        return $topStack[1];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Render top tree
 | 
			
		||||
     *
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user