public function add(PluginInterface $plugin)
    {
        $name = $plugin->getName();
        $this->plugins[$name] = $plugin;
        $this->names = array_keys($this->plugins);

        return $this;
    }
public function add(PluginInterface $plugin)
    {
        $name = $plugin->getName();
        $this->plugins[$name] = $plugin;
        $this->names = array_keys($this->plugins);

        return $this;
    }
public function add ( PluginInterface $ plugin ) { $ name = $ plugin -> getName ( ) ; $ this -> plugins [ $ name ] = $ plugin ; $ this -> names = array_keys ( $ this -> plugins ) ; return $ this ; }
Add a plugin to the collection

Plugins will be keyed by their names.

@param \Cake\Core\PluginInterface $plugin The plugin to load.
@return $this
Add a plugin to the collection