private function createOptions($app)
    {
        $options = array();

        if (isset($app['vars.path'])) {
            $options['path'] = $app['vars.path'];
        }

        if (isset($app['vars.options'])) {
            $options = $this->createKeyedOptions($options, $app['vars.options']);
        }

        if (!isset($options['merge_globals']) || is_null($options['merge_globals'])) {
            $options['merge_globals'] = false;
        }

        if (isset($app['debug']) && $app['debug']) {
            $options['cache'] = false;
        }

        return $options;
    }