original_string: public function addPlugin(Plugin $plugin, $key = null) {
          if ($key) {
              $this->plugins[$key] = $plugin;
          } else {
              $this->plugins[] = $plugin;
          }
          $plugin->configure($this);
          return $this;
      }
code: public function addPlugin(Plugin $plugin, $key = null) {
          if ($key) {
              $this->plugins[$key] = $plugin;
          } else {
              $this->plugins[] = $plugin;
          }
          $plugin->configure($this);
          return $this;
      }
code_tokens: public function addPlugin ( Plugin $ plugin , $ key = null ) { if ( $ key ) { $ this -> plugins [ $ key ] = $ plugin ; } else { $ this -> plugins [ ] = $ plugin ; } $ plugin -> configure ( $ this ) ; return $ this ; }
docstring: Add a plugin
  
  @param Plugin $plugin the instanciated plugin
  @param string $key a key to quickly find the plugin with getPlugin()
  @return TcTable
docstring_tokens: Add a plugin