Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b6dc7ee37d
Fetching contributors…

Cannot retrieve contributors at this time

executable file 36 lines (34 sloc) 0.956 kb
<?php
/**
* Provides and entry point for javascript services .
*
* Will eventually replace all the entry points
*
* TODO make this into a real api entry point.
*
* TODO adopt an api framework
*/
// Include configuration: ( will include LocalSettings.php, and all the extension hooks )
require( dirname( __FILE__ ) . '/includes/DefaultSettings.php' );
$mwEmbedApi = new mwEmbedApi();
$mwEmbedApi->handleRequest();
// Dispatch on extension entry points
class mwEmbedApi{
function handleRequest(){
global $wgMwEmbedApiServices;
$serviceName = $this->getUrlParam( 'service' );
if( isset( $wgMwEmbedApiServices[ $serviceName ] ) ){
$service = new $wgMwEmbedApiServices[$serviceName ];
$service->run();
}
}
/**
* Parse the url request
* TODO actual url request handling
*/
function getUrlParam( $param ){
if( isset( $_REQUEST[ $param ] ) ){
return $_REQUEST[ $param ];
}
}
}
Jump to Line
Something went wrong with that request. Please try again.