public function init($app, $task = '')
    {
        $this->task   = $task;
        $this->output = $app->output;
        // register an internal hook
        $this->register_hook('template_container', array($this, 'template_container_hook'));
        // maybe also register a shudown function which triggers
        // shutdown functions of all plugin objects

        foreach ($this->plugins as $plugin) {
            // ... task, request type and framed mode
            if (!$this->plugins_initialized[$plugin->ID] && !$this->filter($plugin)) {
                $plugin->init();
                $this->plugins_initialized[$plugin->ID] = $plugin;
            }
        }

        // we have finished initializing all plugins
        $this->initialized = true;
    }