* @link http://status.net/
*/
+if (!defined('STATUSNET')) {
+ exit(1);
+}
+
class ImapManager extends IoManager
{
protected $conn = null;
*/
public static function get()
{
- throw new Exception('ImapManager should be created using it\'s constructor, not the static get method');
+ throw new Exception(_m('ImapManager should be created using its constructor, not the using the static get method.'));
}
/**
}
/**
- * Tell the i/o master we need one instance for each supporting site
- * being handled in this process.
+ * Tell the i/o master we need one instance globally.
+ * Since this is a plugin manager, the plugin class itself will
+ * create one instance per site. This prevents the IoMaster from
+ * making more instances.
*/
public static function multiSite()
{
- return IoManager::INSTANCE_PER_SITE;
+ return IoManager::GLOBAL_SINGLE_ONLY;
}
/**
{
return $this->check_mailbox() > 0;
}
-
+
function pollInterval()
{
return $this->plugin->poll_frequency;
}
-
+
protected function connect()
{
$this->conn = imap_open($this->plugin->mailbox, $this->plugin->user, $this->plugin->password);