private function extractAttributes(Route $route)
    {
        $arguments = [
            'namespace' => null,
            'controller' => null,
            'action' => null,
            'args' => []
        ];
        foreach (array_keys($arguments) as $name) {
            $arguments[$name] = array_key_exists($name, $route->attributes)
                ? $route->attributes[$name]
                : $arguments[$name];
        }
        return $arguments;
    }