public function addPlugin(Plugin $plugin, $key = null) {
        if ($key) {
            $this->plugins[$key] = $plugin;
        } else {
            $this->plugins[] = $plugin;
        }
        $plugin->configure($this);
        return $this;
    }
public function addPlugin(Plugin $plugin, $key = null) {
        if ($key) {
            $this->plugins[$key] = $plugin;
        } else {
            $this->plugins[] = $plugin;
        }
        $plugin->configure($this);
        return $this;
    }
public function addPlugin ( Plugin $ plugin , $ key = null ) { if ( $ key ) { $ this -> plugins [ $ key ] = $ plugin ; } else { $ this -> plugins [ ] = $ plugin ; } $ plugin -> configure ( $ this ) ; return $ this ; }
Add a plugin

@param Plugin $plugin the instanciated plugin
@param string $key a key to quickly find the plugin with getPlugin()
@return TcTable
Add a plugin