public function addPlugin(PluginInterface $plugin, $name = null) {
		if ($name === null) {
			$this->plugins[] = $plugin;
			
			return $this;
		}
		
		$this->plugins[$name] = $plugin;
		
		return $this;
	}
public function addPlugin(PluginInterface $plugin, $name = null) {
		if ($name === null) {
			$this->plugins[] = $plugin;
			
			return $this;
		}
		
		$this->plugins[$name] = $plugin;
		
		return $this;
	}
public function addPlugin ( PluginInterface $ plugin , $ name = null ) { if ( $ name === null ) { $ this -> plugins [ ] = $ plugin ; return $ this ; } $ this -> plugins [ $ name ] = $ plugin ; return $ this ; }
Add the plugin

@param  PluginInterface $plugin
@param  string $name
@return Translator
Add the plugin