Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 8c86b7c687
Fetching contributors…

Cannot retrieve contributors at this time

60 lines (46 sloc) 1.404 kB
<?php
/**
* @file
* Generates user-friendly documentation for the services available on the site.
*/
function services_docs_autoload_info() {
return array(
'RESTServicesDocsViewBuiltIn' => array(
'file' => 'includes/RESTServicesDocsView.inc',
),
);
}
function services_docs_services_resources() {
require_once("resources/rest_wadl_doc.inc");
$resources = array();
$resources += services_docs_rest_wadl_resource_definition();
return $resources;
}
function services_docs_rest_server_response_formatters_alter(&$formatters) {
// TODO: if this is a call correlated to a services_doc callback?
// @todo this breaks the rest of the XML formatters for services returns
$formatters['xml']['view'] = "RESTServicesDocsView";
}
/**
* Implementation of hook_perm().
*/
function services_docs_perm() {
return array('access services documentation');
}
/**
* Implementation of hook_menu().
*/
function services_docs_menu() {
$items = array();
$items['wadl.xsl'] = array(
'page callback' => 'services_docs_services_definition_endpoint',
'access arguments' => array('access services documentation'),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
function services_docs_services_definition_endpoint() {
$xsl = "/lib/wadl_documentation-2006-10.xsl";
print_r(file_get_contents(drupal_get_path('module', "services_docs") . $xsl));
exit();
}
Jump to Line
Something went wrong with that request. Please try again.