File: /home/cafsindia/ntc_cafsinfotech_in_bk/cron/ntcObject.php
<?php
/**********************************************************
Filename: cmfObject.php
Description: factory class to manufacture the required objects
Author: uday
Created on: SEP, 06 2019
Approved on:
------------------------------------------------------------
Modification Details
Changed by:
------------------------------------------------------------
**********************************************************/
//error_reporting(0);
if(!isset($_SERVER['HTTP_ACCEPT_ENCODING'])){
ob_start();
}else
if(strpos(' ' . $_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') == false){
if(strpos(' ' . $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') == false){
ob_start();
}else
if(!ob_start("ob_gzhandler")){
ob_start();
}
}else
if(!ob_start("ob_gzhandler")) {
ob_start();
}
require_once 'dbconnect.php';
class ntcObject{
public static function newObject($className)
{
if(include_once $className.'.php') {
return new $className;
}else{
throw new Exception("Unable to create a $className Object");
}
}
}