/** * @param string * consumer key, you may optionally give a consumer key and secret to the class constructor which overrides the default values in the configuration file. * @param string * consumer secret */ public function __construct($consumerKey = null, $consumerSecret = null) { require_once 'Configuration.php'; require_once Configuration::getPathToOauth(); if (!empty($consumerKey) && !empty($consumerSecret)) { $consumer = array('key' => $consumerKey, 'secret' => $consumerSecret); } else { $consumer = Configuration::getConsumer(); } $this->consumer = new OAuthConsumer($consumer['key'], $consumer['secret'], null); $this->signatureMethod = new OAuthSignatureMethod_HMAC_SHA1(); $this->cache = new MendeleyCache('_' . md5($this->consumer->key)); }