<?php 

    class Core {

        protected static $conn;
        protected $connDef;
        protected $config;

        function __construct($conn) {

            $this->config = parse_ini_file(__DIR__ . '/../.env');
            $this->connDef = $conn;
            Core::$conn = $conn->getConnection();          

        }

        function __destruct() {

            Core::$conn = null;

        }

        function getConnection() {            
            return Core::$conn;
        }

    }