public function activateStack(Stack $stack)
    {
        if (null !== $this->activeStack) {
            $stack->setParent($this->activeStack);
        }

        $this->activeStack = $stack;
    }
public function activateStack(Stack $stack)
    {
        if (null !== $this->activeStack) {
            $stack->setParent($this->activeStack);
        }

        $this->activeStack = $stack;
    }
public function activateStack ( Stack $ stack ) { if ( null !== $ this -> activeStack ) { $ stack -> setParent ( $ this -> activeStack ) ; } $ this -> activeStack = $ stack ; }
Mark the stack as active. If a stack was already active, use it as parent for our stack.

@param Stack $stack
Mark the stack as active . If a stack was already active use it as parent for our stack .