Habari\Stack::remove PHP Method

remove() public static method

Remove a value to a stack
public static remove ( string $stack_name, string $value_name = null ) : array
$stack_name string The name of the stack
$value_name string The name of the value to remove
return array The rest of the stack, post-remove
    public static function remove($stack_name, $value_name = null)
    {
        if ($value_name == null) {
            unset(self::$stacks[$stack_name]);
            return array();
        }
        $stack = self::get_named_stack($stack_name);
        if (isset($stack[$value_name])) {
            unset($stack[$value_name]);
        }
        self::$stacks[$stack_name] = $stack;
        return $stack;
    }