function installClasses()
{
    litepublisher::$urlmap = turlmap::i();
    litepublisher::$urlmap->lock();
    $posts = tposts::i();
    $posts->lock();
    $xmlrpc = TXMLRPC::i();
    $xmlrpc->lock();
    ttheme::$defaultargs = array();
    $theme = ttheme::getinstance('default');
    //  $html = tadminhtml::i();
    //      $html->loadinstall();
    foreach (litepublisher::$classes->items as $class => $item) {
        //echo "$class<br>\n";
        if (preg_match('/^(titem|titem_storage|titemspostsowner|tcomment|IXR_Client|IXR_Server|tautoform|tchildpost|tchildposts|tlitememcache)$/', $class)) {
            continue;
        }
        $obj = getinstance($class);
        if (method_exists($obj, 'install')) {
            $obj->install();
        }
    }
    $xmlrpc->unlock();
    $posts->unlock();
    litepublisher::$urlmap->unlock();
}
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function TXMLRPCLivejournalInstall($self)
{
    $caller = TXMLRPC::i();
    $caller->lock();
    //Live journal api
    $caller->add('LJ.XMLRPC.login', 'login', get_class($self));
    $caller->add('LJ.XMLRPC.getchallenge', 'getchallenge', get_class($self));
    $caller->add('LJ.XMLRPC.editevent', 'editevent', get_class($self));
    $caller->add('LJ.XMLRPC.postevent', 'postevent', get_class($self));
    //$caller->add('LJ.XMLRPC.checkfriends', 'checkfriends', get_class($self));
    $caller->unlock();
}
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function TXMLRPCWordpressInstall($self)
{
    $caller = TXMLRPC::i();
    $caller->lock();
    // WordPress API
    $caller->add('wp.getPage', 'wp_getPage', get_class($self));
    $caller->add('wp.getPages', 'wp_getPages', get_class($self));
    $caller->add('wp.deletePage', 'wp_deletePage', get_class($self));
    $caller->add('wp.getPageList', 'wp_getPageList', get_class($self));
    $caller->add('wp.newCategory', 'wp_newCategory', get_class($self));
    $caller->add('wp.deleteCategory ', 'deleteCategory ', get_class($self));
    $caller->add('wp.getTags', 'getTags', get_class($self));
    $caller->unlock();
}
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function TXMLRPCMovableTypeInstall($self)
{
    $caller = TXMLRPC::i();
    $caller->lock();
    // MovableType API
    $caller->add('mt.getCategoryList', 'getCategoryList', get_class($self));
    $caller->add('mt.getRecentPostTitles', 'getRecentPostTitles', get_class($self));
    $caller->add('mt.getPostCategories', 'getPostCategories', get_class($self));
    $caller->add('mt.setPostCategories', 'setPostCategories', get_class($self));
    $caller->add('mt.supportedTextFilters', 'supportedTextFilters', get_class($self));
    $caller->add('mt.getTrackbackPings', 'getTrackbackPings', get_class($self));
    $caller->add('mt.publishPost', 'publishPost', get_class($self));
    $caller->unlock();
}
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function TXMLRPCSystemInstall($self)
{
    $caller = TXMLRPC::i();
    $caller->lock();
    $caller->add('system.listMethods', 'listMethods', get_class($self));
    $caller->add('mt.listMethods', 'supportedMethods', get_class($self));
    $caller->add('system.methodSignature', 'methodSignature', get_class($self));
    $caller->add('system.methodHelp', 'methodHelp', get_class($self));
    $caller->add('system.multicall', 'multicall', get_class($self));
    $caller->add('system.methodExist', 'methodExist', get_class($self));
    $caller->add('demo.sayHello', 'sayHello', get_class($self));
    $caller->add('demo.addTwoNumbers', 'addTwoNumbers', get_class($self));
    $caller->add('sample.add', 'addTwoNumbers', get_class($self));
    $caller->unlock();
}
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function TXMLRPCMetaWeblogInstall($self)
{
    $caller = TXMLRPC::i();
    $caller->lock();
    // MetaWeblog API (with MT extensions to structs)
    $caller->add('metaWeblog.newPost', 'newPost', get_class($self));
    $caller->add('metaWeblog.editPost', 'editPost', get_class($self));
    $caller->add('metaWeblog.getPost', 'getPost', get_class($self));
    $caller->add('metaWeblog.getRecentPosts', 'getRecentPosts', get_class($self));
    $caller->add('metaWeblog.getCategories', 'getCategories', get_class($self));
    $caller->add('metaWeblog.newMediaObject', 'newMediaObject', get_class($self));
    // Aliases
    $caller->add('wp.getCategories', 'getCategories', get_class($self));
    $caller->add('wp.uploadFile', 'newMediaObject', get_class($self));
    //forward wordpress
    $caller->add('wp.newPage', 'wp_newPage', get_class($self));
    $caller->add('wp.editPage', 'wp_editPage', get_class($self));
    $caller->unlock();
}
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function TXMLRPCBloggerInstall($self)
{
    $caller = TXMLRPC::i();
    $caller->lock();
    // Blogger API
    $caller->add('blogger.getUsersBlogs', 'getUsersBlogs', get_class($self));
    $caller->add('blogger.getUserInfo', 'getUserInfo', get_class($self));
    $caller->add('blogger.getPost', 'getPost', get_class($self));
    $caller->add('blogger.getRecentPosts', 'getRecentPosts', get_class($self));
    $caller->add('blogger.newPost', 'newPost', get_class($self));
    $caller->add('blogger.editPost', 'editPost', get_class($self));
    $caller->add('blogger.deletePost', 'deletePost', get_class($self));
    $caller->add('blogger.getTemplate', 'getTemplate', get_class($self));
    $caller->add('blogger.setTemplate', 'setTemplate', get_class($self));
    // MetaWeblog API aliases for Blogger API
    // see http://www.xmlrpc.com/stories/storyReader$2460
    $caller->add('metaWeblog.deletePost', 'deletePost', get_class($self));
    $caller->add('metaWeblog.getUsersBlogs', 'getUsersBlogs', get_class($self));
    $caller->unlock();
}
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function TXMLRPCCommentsInstall($self)
{
    $caller = TXMLRPC::i();
    $caller->lock();
    $caller->add('litepublisher.deletecomment', 'delete', get_class($self));
    $caller->add('litepublisher.comments.setstatus', 'setstatus', get_class($self));
    $caller->add('litepublisher.comments.add', 'add', get_class($self));
    $caller->add('litepublisher.comments.edit', 'edit', get_class($self));
    $caller->add('litepublisher.comments.reply', 'reply', get_class($self));
    $caller->add('litepublisher.comments.get', 'getcomment', get_class($self));
    $caller->add('litepublisher.comments.getrecent', 'getrecent', get_class($self));
    $caller->add('litepublisher.moderate', 'moderate', get_class($self));
    //wordpress api
    $caller->add('wp.getCommentCount', 'wpgetCommentCount', get_class($self));
    $caller->add('wp.newComment', 'wpnewComment', get_class($self));
    if (dbversion) {
        $caller->add('wp.getComment', 'wpgetComment', get_class($self));
        $caller->add('wp.getComments', 'wpgetComments', get_class($self));
        $caller->add('wp.deleteComment', 'wpdeleteComment', get_class($self));
        $caller->add('wp.editComment', 'wpeditComment', get_class($self));
        $caller->add('wp.getCommentStatusList', '	', get_class($self));
    }
    $caller->unlock();
}
function twidgetsUninstall($self)
{
    turlmap::unsub($self);
    $xmlrpc = TXMLRPC::i();
    $xmlrpc->deleteclass(get_class($self));
}
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function TXMLRPCPingbackInstall($self)
{
    $Caller = TXMLRPC::i();
    $Caller->Add('pingback.ping', 'ping', get_class($self));
}
 public function methodExist($name)
 {
     $caller = TXMLRPC::i();
     return $caller->itemexists($name);
 }
Example #12
0
 public function uninstall()
 {
     $caller = TXMLRPC::i();
     $caller->deleteclass(get_class($this));
 }
function TXMLRPCActionUninstall($self)
{
    $caller = TXMLRPC::i();
    $caller->deleteclass(get_class($self));
}