Files
oc-server3/htdocs/okapi/views/introduction.php
T
2012-08-19 18:44:46 +02:00

41 lines
1.1 KiB
PHP

<?php
namespace okapi\views\introduction;
use Exception;
use okapi\Okapi;
use okapi\OkapiRequest;
use okapi\OkapiHttpResponse;
use okapi\ParamMissing;
use okapi\InvalidParam;
use okapi\OkapiServiceRunner;
use okapi\OkapiInternalRequest;
use okapi\views\menu\OkapiMenu;
use okapi\OkapiInternalConsumer;
class View
{
public static function call()
{
require_once $GLOBALS['rootpath'].'okapi/service_runner.php';
require_once $GLOBALS['rootpath'].'okapi/views/menu.inc.php';
$vars = array(
'menu' => OkapiMenu::get_menu_html("introduction.html"),
'okapi_base_url' => $GLOBALS['absolute_server_URI']."okapi/",
'site_url' => $GLOBALS['absolute_server_URI'],
'method_index' => OkapiServiceRunner::call('services/apiref/method_index',
new OkapiInternalRequest(new OkapiInternalConsumer(), null, array())),
'installations' => OkapiMenu::get_installations(),
'okapi_rev' => Okapi::$revision,
);
$response = new OkapiHttpResponse();
$response->content_type = "text/html; charset=utf-8";
ob_start();
include 'introduction.tpl.php';
$response->body = ob_get_clean();
return $response;
}
}