From 97dc0260d9633f857790d54649ad434b0f37ff62 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 3 Mar 2011 16:53:44 -0500 Subject: [PATCH] first pass at microapp class --- lib/microapp.php | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 lib/microapp.php 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); +}