Perform initialization of the View.

Looks up and initializes loader and renderer classes, and initializes the output escape
handler, matching the encoding from the `Response` object.

@return void
354024
protected function _init() {
		parent::_init();

		$encoding = 'UTF-8';

		if ($this->_response) {
			$encoding =& $this->_response->encoding;
		}
		$h = function($data) use (&$encoding) {
			return htmlspecialchars((string) $data, ENT_QUOTES, $encoding);
		};
		$this->outputFilters += compact('h') + $this->_config['outputFilters'];

		foreach (['loader', 'renderer'] as $key) {
			if (is_object($this->_config[$key])) {
				$this->{'_' . $key} = $this->_config[$key];
				continue;
			}
			$class = $this->_config[$key];
			$config = ['view' => $this] + $this->_config;
			$this->{'_' . $key} = Libraries::instance($this->_adapters, $class, $config);
		}
	}
817828
private function initRenderersList(): void
    {
        if (!$this->initDone) {
            foreach ($this->customRendererInstanceNames as $instanceName) {
                $this->customRenderers[$instanceName] = $this->container->get($instanceName);
            }
            foreach ($this->packageRendererInstanceNames as $instanceName) {
                $this->packageRenderers[$instanceName] = $this->container->get($instanceName);
            }

            // Note: We ignore template renderers on purpose.
            $this->initDone = true;
        }
    }
1191221
protected function init()
    {
        try {
            AnnotationRegistry::registerLoader(function ($class) {
                return (bool) class_exists($class);
            });
        } catch (\Exception $e) {
            throw new Exception\AnnotationReaderException($e->getMessage(), $e->getCode(), $e);
        }
    }
1110332
protected function initialize() {
	$request   = bootstrap::get_library('request');
	$response  = bootstrap::get_library('response');
	$exception = bootstrap::get_library('exception');
	
	$this->url    = $request::get_url();
	$this->method = $request::get_method();
	
	if (empty($this->method)) {
		throw new $exception('unknown http method', $response::STATUS_METHOD_NOT_ALLOWED);
	}
}
415435
protected function initialize()
    {
        $class = \get_class($this);

        if (null === self::$loopDefinitions) {
            self::$loopDefinitions = \array_flip($this->container->getParameter('thelia.parser.loops'));
        }

        if (isset(self::$loopDefinitions[$class])) {
            $this->loopName = self::$loopDefinitions[$class];
        }

        if (!isset(self::$loopDefinitionsArgs[$class])) {
            $this->args = $this->getArgDefinitions()->addArguments($this->getDefaultArgs(), false);

            $eventName = $this->getDispatchEventName(TheliaEvents::LOOP_EXTENDS_ARG_DEFINITIONS);
            if (null !== $eventName) {
                $this->dispatcher->dispatch(
                    $eventName,
                    new LoopExtendsArgDefinitionsEvent($this)
                );
            };

            self::$loopDefinitionsArgs[$class] = $this->args;
        }

        $this->args = self::$loopDefinitionsArgs[$class];
    }
1306439
public function initCompiler()
    {
        /** @var ModuleContainerInterface $this */
        if ($onRender = $this->getOption('on_render')) {
            if (isset($this->optionEvents['on_render'])) {
                $this->detach(RendererEvent::RENDER, $this->optionEvents['on_render']);
            }
            $this->attach(RendererEvent::RENDER, $onRender);
        }

        if ($onHtml = $this->getOption('on_html')) {
            if (isset($this->optionEvents['on_html'])) {
                $this->detach(RendererEvent::HTML, $this->optionEvents['on_html']);
            }
            $this->attach(RendererEvent::HTML, $onHtml);
        }

        $this->optionEvents = [
            'on_render' => $onRender,
            'on_html'   => $onHtml,
        ];

        $this->handleOptionAliases();

        $compilerClassName = $this->getOption('compiler_class_name');

        if (!is_a($compilerClassName, CompilerInterface::class, true)) {
            throw new RendererException(
                "Passed compiler class $compilerClassName is ".
                'not a valid '.CompilerInterface::class
            );
        }

        $this->compiler = new $compilerClassName($this->getOptions());
    }
94255
private function initialize(): void
    {
        if (!$this->isBootstrapLayout()) {
            return;
        }

        switch ($this->layout->cols) {
            case '2cll':
                $this->leftClass = $this->layout->bs_leftClass;
                $this->mainClass = $this->layout->bs_mainClass;
                break;

            case '2clr':
                $this->rightClass = $this->layout->bs_rightClass;
                $this->mainClass  = $this->layout->bs_mainClass;
                break;

            case '3cl':
                $this->leftClass  = $this->layout->bs_leftClass;
                $this->rightClass = $this->layout->bs_rightClass;
                $this->mainClass  = $this->layout->bs_mainClass;
                break;

            default:
                $this->useGrid = false;

                return;
        }

        $this->useGrid = true;
    }
1272750
@Override
    protected void initializeImpl()
    {
        //get encoding
        this.responseDataEncoding=this.getConfigurationValue(AbstractHTTPResponseHandler.RESPONSE_DATA_ENCODING_PROPERTY_KEY);
        if(this.responseDataEncoding==null)
        {
            this.responseDataEncoding=IOHelper.getDefaultEncoding();
        }
    }
189377
public function init()
	{
		// parse request to find out whether is an ajax request or not, if so, then return $dataProvider JSON formatted
		$this->json = Yii::app()->getRequest()->getIsAjaxRequest();
		if ($this->json) {
			$this->_showSummary = (strpos($this->template, '{summary}')) ? true : false;
			$this->template = '{items}';
		} // going to render only items!

		parent::init();
	}
812263
public function initialize()
    {
        $this->initializeStreamWrapper();
        $this->initializeContainer();
        $this->initializeEventListeners();

        $this->dispatch(AccompliEvents::INITIALIZE);
    }
661367
public function init()
    {
        $this->request = new Request();
        $this->view = new View();

        $shortcodes = new ShortcodeLoader($this);
        $shortcodes->register();

        $helpers = new HelperLoader($this);
        $helpers->register();
    }
365002
public function initializeObject()
    {
        parent::initializeObject();

        $this->setPathsFromOptions();
        $this->setFormat('html');

        // Doesn't work without setting rendering context.
        // Even if StandaloneView works and we just extend it.
        $renderingContent = new RenderingContext;
        $renderingContent->setControllerContext($this->controllerContext);
        $this->setRenderingContext($renderingContent);
    }
1354408
private static function init() {
        self::$routes = new RoutesManager();
        self::$beforeRoutes = new RoutesManager();
        self::$afterRoutes = new RoutesManager();
        self::$errorRoutes = new RoutesManager();
        self::$notFoundRoutes = new RoutesManager();
    }
307330
public function init()
    {
        parent::init();
        $this->parserHandler = new YiiParserHandler( );
        if ( !empty( $this->configuration ) ) {
            $this->setConfiguration( $this->configuration );
        }
    }
1344122
protected function initialize() {
		foreach ( $this->apply_filters( 'filter', $this->app->config->load( 'filter' ) ) as $class => $tags ) {
			$this->register_class_filter( $class, $tags );
		}
	}
257296
public function initialize()
    {
        Facade::setContainer($this->container);

        if (null !== $loader = $this->loader) {
            $loader->register();
        }
    }
1083123
protected function _init() {
		parent::_init();

		foreach (static::_parents() as $parent) {
			$inherit = get_class_vars($parent);

			if (isset($inherit['_render'])) {
				$this->_render += $inherit['_render'];
			}
			if ($parent === __CLASS__) {
				break;
			}
		}

		$this->request = $this->request ?: $this->_config['request'];
		$this->response = $this->_instance('response', $this->_config['response']);

		if (!$this->request || $this->_render['type']) {
			return;
		}
		if ($this->_render['negotiate']) {
			$this->_render['type'] = $this->request->accepts();
			return;
		}
		$this->_render['type'] = $this->request->get('params:type') ?: 'html';
	}