diff --git a/lib/widget.php b/lib/widget.php new file mode 100644 index 0000000000..e69cc8b744 --- /dev/null +++ b/lib/widget.php @@ -0,0 +1,81 @@ +. + * + * @category Widget + * @package Laconica + * @author Evan Prodromou + * @author Sarven Capadisli + * @copyright 2009 Control Yourself, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + +if (!defined('LACONICA')) { + exit(1); +} + +/** + * Base class for UI widgets + * + * A widget is a cluster of HTML elements that provide some functionality that's used on different + * parts of the site. Examples would be profile lists, notice lists, and common forms. + * + * @category Widget + * @package Laconica + * @author Evan Prodromou + * @author Sarven Capadisli + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + * + * @see HTMLOutputter + */ + +class Widget +{ + /** + * HTMLOutputter to use for output + */ + + var $out = null; + + /** + * Prepare the widget for use + * + * @param HTMLOutputter $out output helper, defaults to null + */ + + function __construct($out=null) + { + $this->out = $out; + } + + /** + * Show the widget + * + * Emit the HTML for the widget, using the configured outputter. + * + * @return void + */ + + function show() + { + } +}