# DefaultController

Extends \NPS\Controller\AbstractController

Base controller for every application instance

package | Default

### Methods

## __construct

    __construct(\Symfony\Component\HttpFoundation\RequestStack $stack)

inherited

### Arguments

#### $stack

`\Symfony\Component\HttpFoundation\RequestStack`

## Helper method which ensures the user being authorized

    authAction()

Route | ("/auth")
IsGranted | ("ROLE_USER")

## Flushes any doctrine related changes

    flush()

inherited

## Returns current request

    getRequest() : \Symfony\Component\HttpFoundation\Request

inherited

### Response

`\Symfony\Component\HttpFoundation\Request`

## Creates a response

    response(array $data = array()) : \Symfony\Component\HttpFoundation\Response

inherited

### Arguments

#### $data

`array`

### Response

`\Symfony\Component\HttpFoundation\Response`

### Properties

## Current request

    request : \Symfony\Component\HttpFoundation\Request

inherited

var | Current request

### Type(s)

`\Symfony\Component\HttpFoundation\Request`