From: Evan Prodromou Date: Thu, 3 Mar 2011 21:53:44 +0000 (-0500) Subject: first pass at microapp class X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=97dc0260d9633f857790d54649ad434b0f37ff62;p=quix0rs-gnu-social.git first pass at microapp class --- diff --git a/lib/microapp.php b/lib/microapp.php new file mode 100644 index 0000000000..77e6abb7e3 --- /dev/null +++ b/lib/microapp.php @@ -0,0 +1,59 @@ +. + * + * @category Microapp + * @package StatusNet + * @author Evan Prodromou + * @copyright 2011 StatusNet, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 + * @link http://status.net/ + */ + +if (!defined('STATUSNET')) { + // This check helps protect against security problems; + // your code file can't be executed directly from the web. + exit(1); +} + +/** + * Superclass for microapp plugins + * + * This class lets you define micro-applications with different kinds of activities. + * + * The applications work more-or-less like other + * + * @category Microapp + * @package StatusNet + * @author Evan Prodromou + * @copyright 2011 StatusNet, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 + * @link http://status.net/ + */ + +class MicroAppPlugin extends Plugin +{ + abstract function isMyNotice($notice); + abstract function isMyActivity($activity); + abstract function saveNoticeFromActivity($activity); + abstract function activityFromNotice($notice); + abstract function showNotice($notice, $out); +}