Defer to template..

@param grading_app $app - All the data to render the grading app.
774240
public function render_grading_app(grading_app $app) {
        $context = $app->export_for_template($this);
        return $this->render_from_template('mod_assign/grading_app', $context);
    }
877918
public function doUpdate( App $app ) {
		if ( ! $app->options_pages ) {
			return FALSE;
		} elseif ( ! function_exists('acf_add_options_page') ) {
			return FALSE;
		}
		foreach ( $app->options_pages as $args ) {
			if ( ! is_array( $args ) ) {
				throw new ConfigException( __("All elements of 'options_pages' array in '*.config.json' must be objects.", 'wpf') );
			}
			acf_add_options_page( $args );
		}
	}
1146027
public function register(Application $app)
    {
        $this->loadProviders();

        foreach ($this->controllerProviders as $class => $values) {
            $app->register(new $class, $values);
        }
    }
174231
public function dueEvents(Application $app)
    {
        return array_filter($this->events, function ($event) use ($app)
        {
            return $event->isDue($app);
        });
    }
1251435
public function bootstrap(Application $app)
    {
        $this->setDefaultPermalinkStructure($app);

        $app['actions']->listen('init', function () use ($app) {
            $this->extractWordPressClasses($app);
            $this->bootstrapRoutes($app['router']);
        });

        $app['actions']->listen('admin_init', function () use ($app) {
            do_action('template_redirect');
            $app['wp_admin_response'] = $app[Kernel::class]->handle($request = Request::capture());
        });
    }
66537
static public function create($templateName, App $app, $templateType = null) {
        if ($templateType === null) {
            $tmp          = explode('.', $templateName);
            $templateType = $tmp[count($tmp) - 1];
        } else {
            $templateType = strtolower($templateType);
        }

        return self::loadTemplate($templateName, $app, $templateType);
    }
466791
public function register(Application $app)
    {
        $prefix = $this->prefix;

        foreach(array('.server', '.options', '.attributes') as $key) {
            if (!(isset($app[$prefix . $key]))) {
                $app[$prefix. $key] = array();
            }
        }

        $app[$prefix] = $this->getPdo($app, $prefix);
    }
940681
public function bootstrap(Container $app)
    {
        Facade::clearResolvedInstances();
        
        Facade::setFacadeApplication($app);
        
        AliasLoader::getInstance($app->make('config')->get('app.aliases'))->register();
        AliasLoader::getInstance($app->make('config')->get('app.theme.aliases', []))->register();
    }
202065
protected function initialize4Twig(Application $app, Renderer $renderer)
    {
        // register autoloader.
        \Twig_Autoloader::register();

        // set directory.
        $twig_loader = null;
        foreach ($app->loader->find($app->config('directory.template')) as $dir) {
            if (! $twig_loader) {
                $twig_loader = new \Twig_Loader_Filesystem($dir->getRealPath());
            } else {
                $twig_loader->addPath($dir->getRealPath());
            }
        }
        if ($twig_loader) {
            foreach ($app->loader->find($app->config('directory.layout')) as $dir) {
                $twig_loader->addPath($dir->getRealPath(), 'layout');
            }
        }

        // init.
        $twig = $renderer->getEngine();
        $twig->setLoader($twig_loader);
        $twig->setCache($app->loader->find($app->config('directory.temp'))->first() . DS . 'twig');
        if ($app->config('renderer.auto_reload')) $twig->enableAutoReload();

        // default escape.
        if (! $app->config('renderer.auto_escape_html')) {
            $twig->removeExtension('escaper');
        }

        // configurations assign.
        $renderer->set('config', $app->configHierarchical());

        // helpers
        $renderer->setComponent('html', new HtmlHelper());
    }
638386
public function add(Classes\App $App)
    {
        $slug            = $App->Config->©brand['©slug'];
        $type            = $App->Config->§specs['§type'];
        $is_network_wide = $App->Config->§specs['§is_network_wide'] && $this->Wp->is_multisite;

        $this->apps[]                                                     = &$App;
        $this->apps_by_slug[$slug]                                        = &$App;
        $this->apps_by_type[$type][$slug]                                 = &$App;
        $this->apps_by_network_wide[(int) $is_network_wide][$type][$slug] = &$App;
    }
85500
public function process($app)
    {
        $spec = array(
            0 => $this->body,
            1 => array("pipe", "wb"),
            2 => STDERR
        );

        $env = array();
        // bring over standard $_SERVER array
        foreach($_SERVER as $k=>$v) if(is_numeric($v) || is_string($v)) $env[$k] = $v;
        $env = array_merge($env, $this->env);
        foreach($this->header as $k=>$v) {
            $env_name = str_replace("-", "_", strtoupper($k));
            if(!isset($this->env[$env_name]))
                $env["HTTP_$env_name"] = is_array($v) ? implode("\n", $v) : $v;
        }

        $app = file_exists($app)? 'require "'.$app.'";' : 'return '.$app.';';
        $dir = dirname(dirname(dirname(__DIR__))).'/rackem.php';
        $code = <<<EOT
if (!class_exists("\Rackem\Server")) require_once "$dir";
if(function_exists("date_default_timezone_set")) date_default_timezone_set("UTC");
$app
EOT;

        $php = defined("PHP_BINARY") ? PHP_BINARY : PHP_BINDIR."/php";
        $this->proc = proc_open("$php -r '$code'", $spec, $pipes, null, $env);
        if(!is_resource($this->proc)) return false;

        $this->stream = $pipes[1];
        stream_set_blocking($this->stream, 0);
    }
1337339
public function beforeRun($app)
    {
        foreach ($app->tags as $name => $config) {
            TagParser::inject($name, $config);
        }
        
        foreach ($this->getModules() as $id => $module) {
            foreach ($module->urlRules as $key => $rule) {
                if (is_string($key)) {
                    $this->_urlRules[$key] = $rule;
                } else {
                    $this->_urlRules[] = $rule;
                }
            }
            
            // get all api rules (since 1.0.10)
            foreach ($module->apiRules as $endpoint => $rule) {
                $this->_apiRules[$endpoint] = $rule;
            }
            
            /**
             * 'api-admin-user' => 'admin\apis\UserController',
             * 'api-cms-navcontainer' => 'admin\apis\NavContainerController'
             */
            foreach ($module->apis as $alias => $class) {
                $this->_apis[$alias] = ['class' => $class, 'module' => $module];
            }
            
            foreach ($module->tags as $name => $config) {
                TagParser::inject($name, $config);
            }
        }
    }
712603
public function run(Application $app)
    {
        $this->trigger(self::EVENT_BEFORE_RUN);
        if (count($this->_afterCallbacks) > 0) {
            $this->runCommandInForeground($app);
        } else {
            $this->runCommandInBackground($app);
        }
        $this->trigger(self::EVENT_AFTER_RUN);
    }
673866
public function register(Container $app): void
    {
        $app['markdown'] = function () {
            return Parsedown::instance();
        };

        $partialsCollection = new Collection();
        $app['partials'] = $partialsCollection;

        /** @var Partial[] $partials */
        $partials = []; //$config->getPartials();
        if ($partials) {
            foreach ($partials as $partial) {
                if (! $partial->getName()) {
                    throw new MissingNameForPartialException('The name of the partial to load is missing');
                }

                $partial->setParser($app['markdown']);
                if (!$partial->getContent() && $partial->getLink()) {
                    if (! is_readable($partial->getLink())) {
                        $app['monolog']->error(
                            sprintf('Partial "%s" not readable or found.', $partial->getLink())
                        );
                        continue;
                    }
                }

                $partialsCollection->set($partial->getName(), $partial);
            }
        }
    }
901976
protected function startBindingsPlugin($app)
    {
        /* @var \Illuminate\Foundation\Application $app */
        $this->requiresPlugins(Commands::class, Events::class);

        $this->onRegister('bindings', function (Application $app) {

            // Container bindings and aliases
            $legacy = ! class_exists('Illuminate\Foundation\Application') || version_compare(\Illuminate\Foundation\Application::VERSION, '5.7.0', '<');
            if ($legacy) {
                foreach ($this->bindings as $binding => $class) {
                    $this->app->bind($binding, $class);
                }
            }

            foreach ($this->weaklings as $binding => $class) {
                $this->bindIf($binding, $class);
            }

            foreach ([ 'share' => $this->share, 'shared' => $this->shared ] as $type => $bindings) {
                foreach ($bindings as $binding => $class) {
                    $this->share($binding, $class, [], $type === 'shared');
                }
            }

            if ($legacy) {
                foreach ($this->singletons as $binding => $class) {
                    if ($this->strict && ! class_exists($class) && ! interface_exists($class)) {
                        throw new \Exception(get_called_class() . ": Could not find alias class [{$class}]. This exception is only thrown when \$strict checking is enabled");
                    }
                    $this->app->singleton($binding, $class);
                }
            }

            foreach ($this->aliases as $alias => $full) {
                if ($this->strict && ! class_exists($full) && ! interface_exists($full)) {
                    throw new \Exception(get_called_class() . ": Could not find alias class [{$full}]. This exception is only thrown when \$strict checking is enabled");
                }
                $this->app->alias($alias, $full);
            }
        });
    }
1006753
public function render($application = null)
    {
        $request = $this->setPathBackup();
        $form = $this->renderTemplate($this->subTemplate);
        $this->resetPathBackup($request);
        $this->setFormParameter($form);

        parent::render($application);
    }
145991
public function bootstrap(Application $app)
    {
        if (app('antares.installed')) {
            //app('antares.license.response')->validate();
        }
        $this->setCurrentTheme($app);
        $this->setThemeResolver($app);
    }