<?php
defined('BASEPATH') OR exit('No direct script access allowed');
use Restserver\Libraries\REST_Controller;
require(APPPATH . 'libraries/REST_Controller.php');
class Webapi extends REST_Controller
{
// Define global variables
var $postData;
/**
* @desc Class constructor
* @author Allie Syadiqin
* @access public
* @param void
* @return NULL
*/
function __construct()
{
// Construct the parent class
parent::__construct();
// Load libraries
$this->load->library('template/acd_api_lib');
// Load models
$this->load->model('template/acd_api_model');
// Set XSS filtering
$this->postData = $this->input->post(null, true);
// Define current time with local timezone
$currentDateObj = new DateTime("now", new DateTimeZone('Australia/Brisbane') );
$this->currentDateTime = $currentDateObj->format('Y-m-d H:i:s');
}
// End class constructor
/**
* @desc Endpoint to authenticate user
* @author Allie Syadiqin
* @access public
* @param void
* @return REST_Controller response
*/
public function authenticate_post()
{
// Define variables
$apiKey = $this->postData['apiKey'];
$providerId = $this->postData['providerId'];
printr($this->postData);
}
// End method authenticate_post()
}
// End class Webapi