<?php

final class BaseLog
{

    public $baseLog;

    public function __construct($registry)
    {
        $this->registry = $registry;
        $this->load = $registry->get('load');
        $this->config = $registry->get('config');
        $this->db = $registry->get('db');
        $this->request = $registry->get('request');
        $this->baseLog = new BaseLogClass();
    }

    public function __get($name)
    {
        return $this->registry->get($name);
    }

    public function saveBaseLog()
    {
        $baseLog = get_object_vars($this->baseLog);

        if(count(array_filter($baseLog)) > 0) {

            $this->load->dmodel('log/log');
            $this->dmodel_log_log->saveLogDB($baseLog);

        }
    }





}