|
ExAppReqComm
Establish ExApp Requesting Communication
ExApp Requesting CommunicationThe Requesting party of the communication is now ExApp. And all the actual functionality reside on Joomla. What we've do is configure the API and use (call methods) as necessary. As described in early wikies there are two class to this and there purpose is described below.
Let's Beginbefore we go any further we assume that the folder structure is looks like this. and you've successfully configured the ExApp API. before you call any methods in the class's you've to include the API like this include_once('jconnect_api/api.php');then you can get the references for each Joomla and JConnect like this... $joomla=JCFactory::getJoomla(); $jconnect=JCFactoty::getJConnect(); Work with JoomlaReference to Joomla allows you to invoke /request back-end methods of Joomla!. Currently it support only for User Management only. methods
then you can call these methods inside your code as necessary. eg:- function deleteUserHook($username){
$joomla=JCFactory::getJoomla();
$joomla->deleteUser($username);
}elgg's use of the this can be viewed here. Work with JConnectReference to JConnect will help you to do Authentication and Single Sign On based on Joomla with extending JCAuth class. JCAuth has two methods
extended class:JCMyAppAuth you'can implement application logic when particular action occurred in those methods and add them to API (setting.php). //in /modules/my_mod/jconnect_api/setting.php
include_once('./auth.php');
JCFactory::register('auth',new JCMyAppAuth());implementation of this class in elgg can be found here.. Now what you've do it get the reference of JConnect and call the methods in the correct places in your application. methods
elgg's use of logout Now you've successfully established the ExApp Requesting Communication |
Sign in to add a comment