public function addPlugin(IPlugin $plugin, $autoExecute = false) {
        if (isset($this[$plugin->getPluginName()])) {
            return $this;
        }

        $plugin->setApplication($this);
        $plugin->initPlugin();

        if ($autoExecute) {
            $this->{$plugin->getPluginName()};
        }

        return $this;
    }
public function addPlugin(IPlugin $plugin, $autoExecute = false) {
        if (isset($this[$plugin->getPluginName()])) {
            return $this;
        }

        $plugin->setApplication($this);
        $plugin->initPlugin();

        if ($autoExecute) {
            $this->{$plugin->getPluginName()};
        }

        return $this;
    }
public function addPlugin ( IPlugin $ plugin , $ autoExecute = false ) { if ( isset ( $ this [ $ plugin -> getPluginName ( ) ] ) ) { return $ this ; } $ plugin -> setApplication ( $ this ) ; $ plugin -> initPlugin ( ) ; if ( $ autoExecute ) { $ this -> { $ plugin -> getPluginName ( ) } ; } return $ this ; }
Add a plugin to the application
@param \Oito\Micro\IPlugin $plugin Plugin instance
@param boolean $autoExecute Auto execute the plugin after adding it?
@return \Oito\Micro\Application
Add a plugin to the application