* @maintainer Brion Vibber <brion@status.net>
*/
-class SubMirror extends Memcached_DataObject
+class SubMirror extends Managed_DataObject
{
public $__table = 'submirror';
public $created;
public $modified;
- public /*static*/ function staticGet($k, $v=null)
- {
- return parent::staticGet(__CLASS__, $k, $v);
- }
-
/**
* return table definition for DB_DataObject
*
/**
* Temporary hack to set up the compound index, since we can't do
* it yet through regular Schema interface. (Coming for 1.0...)
- *
+ *
* @param Schema $schema
* @return void
*/
function keyTypes()
{
- // @fixme keys
+ // @todo FIXME keys
// need a sane key for reverse lookup too
return array('subscriber' => 'K', 'subscribed' => 'K');
}
$mirror->created = common_sql_now();
$mirror->modified = common_sql_now();
$mirror->insert();
-
+
return $mirror;
}
*/
public function mirrorNotice($notice)
{
- $profile = Profile::staticGet('id', $this->subscriber);
+ $profile = Profile::getKV('id', $this->subscriber);
if (!$profile) {
- common_log(LOG_ERROR, "SubMirror plugin skipping auto-repeat of notice $notice->id for missing user $profile->id");
+ common_log(LOG_ERR, "SubMirror plugin skipping auto-repeat of notice $notice->id for missing user $profile->id");
return false;
}
* This retains attribution within the site, and other nice things,
* but currently ends up looking like 'RT @foobar bla bla' when
* bridged out over OStatus or TwitterBridge.
- *
+ *
* @param Notice $notice
* @return mixed Notice on successful repeat, true if already repeated, false on failure
*/
* Mirror a notice by emitting a new notice with the same contents.
* Kind of dirty, but if pulling an external data feed into an account
* that may be what you want.
- *
+ *
* @param Notice $notice
* @return mixed Notice on successful repeat, true if already repeated, false on failure
*/
/**
* Get the mirroring setting for a pair of profiles, if existing.
- *
+ *
* @param Profile $subscriber
* @param Profile $subscribed
* @return mixed Profile or empty