/** * @see sfTask */ protected function execute($arguments = array(), $options = array()) { $plugins = sfSympalPluginToolkit::getAvailablePlugins(); $api = new sfSympalPluginApi(); if ($api->getUsername() && $api->getPassword()) { foreach ($plugins as $plugin) { $result = $api->put('plugins/' . $plugin . '/users.xml'); if ($result['status'] == 1) { $this->logSection('sympal', 'Reported use of "' . $plugin . '"...'); } } } else { throw new sfException('You must specify a username and password for the Symfony plugins api in your Sympal configuration.'); } }
protected function execute($arguments = array(), $options = array()) { $plugins = sfSympalPluginToolkit::getAvailablePlugins(); if (isset($options['search']) && $options['search']) { $this->logSection('sympal', 'Searching for "' . $options['search'] . '"'); $this->search = $options['search']; $plugins = array_filter($plugins, array($this, '_searchPlugins')); } if (!empty($plugins)) { $this->logSection('sympal', 'Found ' . count($plugins) . ' Sympal Plugin(s)'); $this->logSection('sympal', str_repeat('-', 30)); foreach ($plugins as $plugin) { $name = sfSympalPluginToolkit::getShortPluginName($plugin); $this->logSection('sympal', $plugin); $this->logSection('sympal', "\$ php symfony sympal:plugin-download " . $name); $this->logSection('sympal', "\$ php symfony sympal:plugin-install " . $name); $this->logSection('sympal', null); } } else { throw new sfException('No sympal plugins found'); } }