Pluginize the URL shorteners

This commit is contained in:
Craig Andrews
2009-09-03 14:58:50 -04:00
parent 5db43f4655
commit beae3db413
8 changed files with 305 additions and 125 deletions

View 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);
}
}