51 lines
1.1 KiB
PHP
51 lines
1.1 KiB
PHP
<?php
|
|
|
|
class UnitTestController
|
|
{
|
|
function __construct()
|
|
{
|
|
if (SERVER_ENV == _ONLINE) {
|
|
die("can't create UnitTestController");
|
|
return;
|
|
}
|
|
}
|
|
|
|
public function getEquipConf()
|
|
{
|
|
require_once 'metatable/equip.php';
|
|
echo json_encode(metatable\getEquipConf());
|
|
}
|
|
|
|
public function getEquipById()
|
|
{
|
|
require_once 'metatable/equip.php';
|
|
echo json_encode(metatable\getEquipById($_REQUEST['equip_id']));
|
|
}
|
|
|
|
public function getParameterConf()
|
|
{
|
|
require_once 'metatable/parameter.php';
|
|
echo json_encode(metatable\getParameterConf());
|
|
}
|
|
|
|
public function getParameterByName()
|
|
{
|
|
require_once 'metatable/parameter.php';
|
|
echo json_encode(metatable\getParameterByName($_REQUEST['param_name']));
|
|
}
|
|
|
|
public function shopRandGoods()
|
|
{
|
|
require_once 'metatable/shop.php';
|
|
echo json_encode(metatable\randGoods(
|
|
metatable\getShopById($_REQUEST['shop_id']),
|
|
array(
|
|
'102' => 1,
|
|
'103' => 1,
|
|
'104' => 1
|
|
)
|
|
));
|
|
}
|
|
|
|
}
|