private function getActions($tag, $remove)
    {
        if (isset($this->callbacks[$tag])) {
            $actions = $this->callbacks[$tag];
            if ($remove) {
                unset($this->callbacks[$tag]);
            }
        }

        return (isset($actions)) ? $actions : [];
    }