public function __construct() { $baseurl = "http://{$_SERVER['HTTP_HOST']}/"; $apikey = $this->getApiKey(); if (empty($apikey)) { throw new Wetantispam_Plugin_Exception('Akismet API key not set. Please fix this issue by setting the Akismet API key in this plugin\'s admin panel.'); } parent::__construct($apikey, $baseurl); }
public function __construct($type) { $this->_type = $type; switch ($type) { case self::TYPE_AKISMET: $apiKey = Zend_Registry::get('config')->akismet->key; break; case self::TYPE_TYPEPAD: $apiKey = Zend_Registry::get('config')->typePadAntiSpam->key; break; default: throw new Exception('Wrong spam service type'); } parent::__construct($apiKey, 'http://www.kb-m.com'); }