private function configureViewEncoder($options, $controller, $action)
    {
        // configure the view encoder if they specify a view option
        if (isset($options[self::KEY_VIEWS])) {
            $this->encoder = new TwigViewEncoder(
                $options[self::KEY_VIEWS],
                sprintf('%s/%s.twig', $controller, $action)
            );
        } else {
            $this->encoder = new NullEncoder();
        }
    }