uiharu/public/index.php

21 lines
713 B
PHP

<?php
namespace Uiharu;
require_once __DIR__ . '/../uiharu.php';
$ctx->registerLookup(new \Uiharu\Lookup\EEPROMLookup('eeprom', 'eeprom.flashii.net', ['i.fii.moe', 'i.flashii.net']));
if(UIH_DEBUG)
$ctx->registerLookup(new \Uiharu\Lookup\EEPROMLookup('devrom', 'eeprom.edgii.net', ['i.edgii.net']));
$ctx->registerLookup(new \Uiharu\Lookup\YouTubeLookup($cfg->scopeTo('google')));
$ctx->registerLookup(new \Uiharu\Lookup\NicoNicoLookup);
// this should always come AFTER other lookups involved http(s)
$ctx->registerLookup(new \Uiharu\Lookup\WebLookup);
$ctx->setupHttp();
$ctx->registerApi(new \Uiharu\Apis\v1_0($ctx));
$ctx->matchApi(filter_input(INPUT_SERVER, 'REQUEST_URI'));
$ctx->dispatchHttp();