callback on initialize.

@access  public
@param   Samurai\Samurai\Application $app
@param   Samurai\Samurai\Component\Renderer\Renderer $renderer
186678
public function initialize(Application $app, Renderer $renderer)
    {
        switch ($app->config('renderer.name')) {
            case 'twig':
                $this->initialize4Twig($app, $renderer);
                break;
        }
    }
534801
public function setRenderingContext(RenderingContextInterface $renderingContext)
    {
        $this->baseRenderingContext = $renderingContext;
        $this->baseRenderingContext->getViewHelperVariableContainer()->setView($this);
        $this->controllerContext = $renderingContext->getControllerContext();
    }
1084037
public function init()
    {
        $this->view->setRenderLevel(
            \Phalcon\Mvc\View::LEVEL_NO_RENDER
        );

        if ( $this->request->isGet() ) { 
            static::$p = max(1, $this->request->get('p', 'int'));
            static::$offset = (static::$p - 1) * static::$limit;
        }
    }
428471
protected function initRenderer()
    {
        $renderer = new PhpRenderer();

        $plugins = $renderer->getHelperPluginManager();
        $config  = new \Zend\Form\View\HelperConfig;
        $config->configureServiceManager($plugins);

        $resolver = new Resolver\AggregateResolver();
        $map = new Resolver\TemplateMapResolver($this->getTable()->getOptions()->getTemplateMap());
        $resolver->attach($map);

        $renderer->setResolver($resolver);
        $this->renderer = $renderer;
    }
1148169
@Override
	protected BundleRenderer createRenderer(FacesContext context) {

		ResourceBundlesHandler rsHandler = getResourceBundlesHandler(context);
		String type = (String) getAttributes().get(JawrConstant.TYPE_ATTR);
		boolean async = Boolean.parseBoolean((String) getAttributes().get(JawrConstant.ASYNC_ATTR));
		boolean defer = Boolean.parseBoolean((String) getAttributes().get(JawrConstant.DEFER_ATTR));
		String crossorigin = (String) getAttributes().get(JawrConstant.CROSSORIGIN_ATTR);
		return RendererFactory.getJsBundleRenderer(rsHandler, type, getUseRandomParamFlag(rsHandler.getConfig()), async,
				defer, crossorigin);
	}
377125
public function initialize()
    {
        //The global dispatcher

        //state the application is initialized;
        //register aliases as class mocks such that static calls on mock map to instance calls;
        $this->createAliasMock(
            array_merge(
                $this->aliases, [
                    "route" => 'Budkit\Routing\Router', //this such that we can call Route::add to add router;
                    'controller' => 'Budkit\Routing\Controller',
                    'view' => 'Budkit\View\Display'
                ]
            )
        );

        //Trigger the app initialise event;
        $this->observer->trigger(new Event("app.init", $this));
    }
949995
function preRun ()
  {
    $firstRendering = !$this->renderCount++;
    if ($this->isVisible ()) {
      if ($firstRendering) {
        $this->applyPresetsOnSelf ();
        $this->setupFirstRun ();
      }
      else $this->setupRepeatedRun ();
      $this->databind ();       // This is done on the data binding context of the component's parent.
      if ($firstRendering) {
        $this->createView ();
        $this->setupView ();
      }
      $this->afterPreRun ();   // Here, composite components may setup its view model and data binder.
    }
  }
1023585
protected function initializeApplication()
    {
        if ($this->isApplicationInitialized) {
            return;
        }

        $this->application = new Application();
        $this->application->build($this->options);

        $this->registerHelper(sprintf('%s:%s', get_class($this), 'dump'));

    }
583644
public function register(Renderer $renderer) {
        $this->registerTokenRenderer(StrongRule::NAME . StrongRule::OPEN, 'renderOpen', $renderer);
        $this->registerTokenRenderer(StrongRule::NAME . StrongRule::CLOSE, 'renderClose', $renderer);

        $this->registerTokenRenderer(StrongAltRule::NAME . StrongAltRule::OPEN, 'renderAltOpen', $renderer);
        $this->registerTokenRenderer(StrongAltRule::NAME . StrongAltRule::CLOSE, 'renderAltClose', $renderer);
    }
576722
public static void initApplication(Application app){
		
		// Add the Jawr tag handler to the MarkupParserFactory 
		MarkupFactory factory = new MarkupFactory(){
			
			public MarkupParser newMarkupParser(final MarkupResourceStream resource)
		    {
		       MarkupParser parser = new MarkupParser(new XmlPullParser(), resource);
		       parser.add(new JawrWicketLinkTagHandler());
		       return parser;
		    }
		};
		
		app.getMarkupSettings().setMarkupFactory(factory);
		
		// Add the Jawr link resolver
		app.getPageSettings().addComponentResolver(new JawrWicketLinkResolver());
	}
1318773
public function initialize()
    {
        /**
         * Attaches event fired before view render
         * It allows to use $this->view->partial inside of action method before action view is being rendered
         */
        $this->eventsManager->attach('view:beforeRenderView', function($event, $view, $engineViewPath) {
            if ($view instanceof View) {
                $view->setControllerViewPath($this->router->getControllerName());
            }
        });
    }
1261623
public function boot (Application $app) {
        if (isset($app[self::NS . ".default_args"]) && is_array($app[self::NS . ".default_args"])) {
            $this -> getPreserialiser($app) -> setDefaultArgs($app[self::NS . ".default_args"]);
        } else {
        }
    }
886782
public function addRenderer(RendererAbstract $renderer)
    {
        $extension = $renderer->getExtension();

        if (isset($this->renderer[$extension])) {
            return false;
        }
        
        $this->renderer[$extension] = $renderer;
        return true;
    }
990443
protected function callAfterCallbacks(Application $app)
    {
        foreach ($this->_afterCallbacks as $callback) {
            call_user_func($callback, $app);
        }
    }
146224
public function register(Renderer $renderer) {
        $this->registerTokenRenderer(ImageInlineRule::NAME, 'renderInline', $renderer);
        $this->registerTokenRenderer(ImageReferenceRule::NAME, 'renderReference', $renderer);
    }
416537
public function initFromApplication(ApplicationInterface $application)
    {
        $this->setNodeName(self::NODE_NAME);
        $this->name = $application->getName();
        $this->webappPath = $application->getWebappPath();
        $this->setUuid($this->newUuid());
    }
799475
protected function addRenderFormat(RenderInterface $renderer)
    {
        foreach ($renderer->getSupportedFormats() as $format) {
            $this->renderers[$format] = $renderer;
        }
    }