<?php
/**
* @package RestCreateTable
* @copyright Copyright (c) PT Gamatechno Indonesia
* @Analyzed By Dyan Galih
* @author Didi Zuliansyah
* @version 01
* @startDate 2013-01-01
* @lastUpdate 2013-01-01
* @description Class RestCreateTable
*/

require_once GTFWConfiguration::GetValue( 'application', 'docroot') . 'module/'.Dispatcher::Instance()->mModule.'/business/restSimakBmn.class.php';

class RestCreateTable extends RestResponse {

	public function get() {
	}
	
	public function post() {
		$obj = new restSimakBmn(1); # use connection 1 (gtaset_dbbmn)
		if(is_object($_POST)) $post = $_POST->AsArray();
		if($obj->Connect()) $result = $obj->createTable($post);
		if ($result){
			$status = 200;
			$msg = "Berhasil Create Table";
		}else{
			$status = 201;
			$msg = "Gagal Create Table";
		}
		return array("status"=>$status,"message"=>$msg,"data"=>array());
	}
	
	public function put() {
	}
	
	public function delete() {
	
	}
}
?>