]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/plugin.php
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / lib / plugin.php
index 87d7be5a7597296bb2c2d777358f7365455beb5d..59bf3ba9d695914c6544dd76dade659e97bd2dad 100644 (file)
@@ -76,4 +76,18 @@ class Plugin
     {
         return true;
     }
+
+    /* 
+    * the name of the shortener
+    * shortenerInfo associative array with additional information. One possible element is 'freeService' which can be true or false
+    * shortener array, first element is the name of the class, second element is an array to be passed as constructor parameters to the class
+    */
+    function registerUrlShortener($name, $shortenerInfo, $shortener)
+    {
+        global $_shorteners;
+        if(!is_array($_shorteners)){
+            $_shorteners=array();
+        }
+        $_shorteners[$name]=array('info'=>$shortenerInfo, 'callInfo'=>$shortener);
+    }
 }