roundcubemail/program/lib/Roundcube/rcube_plugin_api.php
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;
    }
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;
    }
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 ; }
Initialize plugin engine

This has to be done after rcmail::load_gui() or rcmail::json_init()
was called because plugins need to have access to rcmail->output

@param object rcube Instance of the rcube base class
@param string Current application task (used for conditional plugin loading)
Initialize plugin engine