streams/Code/Module/Hostxrd.php

33 lines
696 B
PHP
Raw Normal View History

<?php
2022-02-16 04:08:28 +00:00
namespace Code\Module;
2021-12-02 22:33:36 +00:00
use App;
2022-02-16 04:08:28 +00:00
use Code\Web\Controller;
use Code\Extend\Hook;
use Code\Render\Theme;
2022-02-12 20:43:29 +00:00
2021-12-02 22:33:36 +00:00
2021-12-02 23:02:31 +00:00
class Hostxrd extends Controller
{
public function init()
{
session_write_close();
header('Access-Control-Allow-Origin: *');
header("Content-type: application/xrd+xml");
logger('hostxrd', LOGGER_DEBUG);
2022-02-12 20:43:29 +00:00
$tpl = Theme::get_template('xrd_host.tpl');
$x = replace_macros(Theme::get_template('xrd_host.tpl'), array(
2021-12-02 23:02:31 +00:00
'$zhost' => App::get_hostname(),
'$zroot' => z_root()
));
$arr = array('xrd' => $x);
Hook::call('hostxrd', $arr);
2021-12-02 23:02:31 +00:00
echo $arr['xrd'];
killme();
}
}