public function before($callback, $group = null, $methods = array())
    {
        $methods = array_map('strtoupper', $methods);
        if ($group === null) {
            if (self::$group !== null) {
                $group = self::$group;
            } else {
                $group = 'global';
            }
        }

        $this->addMiddleware(new Middleware($callback, 'before', $methods, $group));
    }