<?php

/**
 *	Core Class
 *  --------------
 *	Description : Move functions to objects
 *	Written by  : Kyriazis
 *	Version     : 1.0.0
 *  Created     : 09/07/2015
 *  Updated	    : 
 *	
 **/

class Database {
	
    
	public function __construct()
	{
        
	}
	
	//==========================================================================
    // Class Destructor
	//==========================================================================
    public function __destruct()
	{
		//echo 'Object has been destroyed';
    }
    
    public static function GetConnection()
    {
        $connection = mysqli_connect(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, DATABASE_NAME) or die('Connection Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());
        mysqli_query($connection, "SET NAMES 'utf8'") or die('Collation Error (' . mysqli_connect_errno() . ') '. mysqli_connect_error());
        return $connection;
    }

}
?>