/**
  * @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 _initialize()
 {
     $cachePath = sfConfig::get('sf_cache_dir') . '/sympal/' . $this->_name . '.cache';
     if (!file_exists($cachePath)) {
         $this->_loadFromSymfonyPlugins();
         if ($pluginConfiguration = sfSympalPluginToolkit::isPluginDownloaded($this->_name)) {
             $downloadPath = sfContext::getInstance()->getConfiguration()->getPluginConfiguration($this->_name)->getRootDir();
         } else {
             $downloadPath = sfSympalPluginToolkit::getPluginDownloadPath($this->_name);
         }
         $packageXmlPath = $downloadPath . '/package.xml';
         $readmePath = $downloadPath . '/README';
         if (sfSympalToolkit::fileGetContents($packageXmlPath)) {
             $packageXml = simplexml_load_file($packageXmlPath);
         } else {
             if (sfSympalToolkit::fileGetContents($packageXmlPath . '.tmpl')) {
                 $packageXml = simplexml_load_file($packageXmlPath . '.tmpl');
             }
         }
         if (isset($packageXml)) {
             $package = sfSympalPluginApi::simpleXmlToArray($packageXml);
             $this->_plugin = array_merge($package, $this->_plugin);
         }
         if ($readme = sfSympalToolkit::fileGetContents($readmePath)) {
             $this->_plugin['readme'] = $readme;
         }
         $this->_plugin['name'] = $this->_name;
         file_put_contents($cachePath, serialize($this->_plugin));
     } else {
         $serialized = file_get_contents($cachePath);
         $this->_plugin = unserialize($serialized);
     }
 }