public function getPlugin($slug)
    {
        $this->plugins->rewind();
        while ($this->plugins->valid()) {
            if ($this->plugins->current()->getSlug() == $slug) {
                return $this->plugins->current();
            }
            $this->plugins->next();
        }

        return false;
    }
public function getPlugin($slug)
    {
        $this->plugins->rewind();
        while ($this->plugins->valid()) {
            if ($this->plugins->current()->getSlug() == $slug) {
                return $this->plugins->current();
            }
            $this->plugins->next();
        }

        return false;
    }
public function getPlugin ( $ slug ) { $ this -> plugins -> rewind ( ) ; while ( $ this -> plugins -> valid ( ) ) { if ( $ this -> plugins -> current ( ) -> getSlug ( ) == $ slug ) { return $ this -> plugins -> current ( ) ; } $ this -> plugins -> next ( ) ; } return false ; }
Get a plugin by slug or return false when none can be found

@param string $slug
@return bool|PluginInterface
Get a plugin by slug or return false when none can be found