Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (2)

View Page History

class Zend_Service_Mollom {
/**
* The API version supported by this service.
*/
const API_VERSION = '1.0';

/**
* Fault codes
*/
const FAULT_REFRESH = 1100;
const FAULT_BUSY = 1200;

/**
* Classification labels
*/
const CLASSIFICATION_HAM = 'ham';
const CLASSIFICATION_SPAM = 'spam';
const CLASSIFICATION_UNSURE = 'unsure';

/**
* Feedback types
*/
const FEEDBACK_SPAM = 'spam';
const FEEDBACK_PROFANITY = 'profanity';
const FEEDBACK_LOWQUALITY = 'low-quality';
const FEEDBACK_UNWANTED = 'unwanted';

/**
* Statistics types
*/
const STATISTICS_TOTAL_DAYS = 'total_days';
const STATISTICS_TOTAL_ACCEPTED = 'total_accepted';
const STATISTICS_TOTAL_REJECTED = 'total_rejected';
const STATISTICS_YESTERDAY_ACCEPTED = 'yesterday_accepted';
const STATISTICS_YESTERDAY_REJECTED = 'yesterday_rejected';
const STATISTICS_TODAY_ACCEPTED = 'today_accepted';
const STATISTICS_TODAY_REJECTED = 'today_rejected';

/**
* Constructor
*
* @param string $publicKey The public key
* @param string $privateKey The private key
*/
public function __construct($publicKey, $privateKey)

/**
* Get the public key used for making API calls
*
* @return string The public key
*/
public function getPublicKey()

/**
* Set the public key used for making API calls
*
* @param string $publicKey The public key
* @return Zend_Service_Mollom
*/
public function setPublicKey($publicKey)

/**
* Get the private key used for making API calls
*
* @return string The private key
*/
public function getPrivateKey()

/**
* Set the private key used for making API calls
*
* @param string $privateKey The private key
* @return Zend_Service_Mollom
*/
public function setPrivateKey($privateKey)

/**
* Returns the set cache
*
* @return Zend_Cache_Core The set cache
*/
public static function getCache()

/**
* Set a cache for Zend_Service_Mollom
*
* @param Zend_Cache_Core $cache A cache frontend
*/
public static function setCache(Zend_Cache_Core $cache)

/**
* Returns true when a cache is set
*
* @return boolean
*/
public static function hasCache()

/**
* Removes any set cache
*
* @return void
*/
public static function removeCache()

/**
* Clears all set cache data
*
* @return void
*/
public static function clearCache()

/**
* Validate a captcha.
*
* @param string $session_id The ID of the solved captcha
* @param string $solution The solution of the captcha
* @return boolean Whether it was solved correctly or not
*/
public function checkCaptcha($session_id, $solution)

/**
* Check the content to see whether it's spam or not.
*
* The $params array can have any of the following keys:
* - session_id
* - post_title
* - post_body
* - author_name
* - author_url
* - author_mail
* - author_openid
* - author_ip
* - author_id
*
* The meaning of these parameters is available in the Mollom API documentation:
* http://mollom.com/api
*
* @param array $params A key/value pair containing the content of the post to be checked.
* @return array An array with a classification label, a rating and a session id.
*/
public function checkContent(array $params)

/**
* Get an audio captcha for a given session id
*
* @param string $session_id The session id, will be generated if omitted
* @param string $author_ip The IP of the content author (the person that will need to solve the captcha)
* @return array An array containing a session_id and a captcha url.
*/
public function getAudioCaptcha($session_id = null, $author_ip = null)

/**
* Get an image captcha for a given session id
*
* @param string $session_id The session id, will be generated if omitted
* @param string $author_ip The IP of the content author (the person that will need to solve the captcha)
* @return array An array containing a session_id and a captcha url.
*/
public function getImageCaptcha($session_id = null, $author_ip = null)

/**
* Get the list of servers used to make API calls
*
* @return array An array of strings containing server URLs
*/
public function getServers()

/**
* Retrieve statistics about your mollom usage
*
* @param string $type The desired statistic type (check the STATISTICS_* constants for possible values).
* @return int The value of the requested statistic
*/
public function getStatistics($type)

/**
* Send feedback to the Mollom service, used to classify unsure content manually.
*
* @param string $session_id The object to which the feedback relates
* @param string $feedback A feedback rating (see the FEEDBACK_* constants)
*/
public function sendFeedback($session_id, $feedback)

/**
* Verify the current key.
*
* Will not throw an exception when valid.
*/
public function verifyKey()
}
{code}