public static function factory(array $middlewares = array())
    {
        $runner = null;
        foreach ($middlewares as $middleware) {
            $runner = $runner ? $runner->add($middleware) : new static($middleware);
        }
        return $runner;
    }