-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.php
executable file
·35 lines (30 loc) · 1.28 KB
/
api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/***************************************************************************
* *
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
* *
* This is commercial software, only users who have purchased a valid *
* license and accept to the terms of the License Agreement can install *
* and use this program. *
* *
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
use Tygh\Api;
use Tygh\Registry;
// Area will be defined in Api::defineArea.
define('API', true);
define('NO_SESSION', true);
try {
require dirname(__FILE__) . '/init.php';
/**
* @var Api $api
*/
$api = Tygh::$app['api'];
if ($api instanceof Api) {
$api->handleRequest();
}
} catch (Tygh\Exceptions\AException $e) {
$e->output();
}