]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/widget.php
Type testing instead of just empty() in OStatusPlugin
[quix0rs-gnu-social.git] / lib / widget.php
index 43bc4a481f6165afb60269eb515e9f43d1118e8b..d068dea0f031b295a85fa73232c223abd437fb4e 100644 (file)
@@ -28,7 +28,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -79,4 +79,30 @@ class Widget
     function show()
     {
     }
+
+    /**
+     * Get HTMLOutputter
+     *
+     * Return the HTMLOutputter for the widget.
+     *
+     * @return HTMLOutputter the output helper
+     */
+
+    function getOut()
+    {
+        return $this->out;
+    }
+
+    /**
+     * Delegate output methods to the outputter attribute.
+     *
+     * @param string $name      Name of the method
+     * @param array  $arguments Arguments called
+     *
+     * @return mixed Return value of the method.
+     */
+    function __call($name, $arguments)
+    {
+        return call_user_func_array(array($this->out, $name), $arguments);
+    }
 }