Armored getContextPath()
This commit is contained in:
		@@ -60,10 +60,17 @@ class Shell
 | 
			
		||||
 | 
			
		||||
    public function getContextPath($separator=":")
 | 
			
		||||
    {
 | 
			
		||||
        // Return null if we don't have a current context
 | 
			
		||||
        if (!$this->context) 
 | 
			
		||||
            return null;
 | 
			
		||||
        
 | 
			
		||||
        // Assemble the contexts to walk
 | 
			
		||||
        $stack = [ $this->context->getName() ];
 | 
			
		||||
        foreach ($this->contextStack as $context) {
 | 
			
		||||
            $stack[] = $context->getName();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Reverse the order to make it more logical
 | 
			
		||||
        $stack = array_reverse($stack);
 | 
			
		||||
        return join($separator,$stack);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user