Files
2021-07-05 09:56:27 +08:00

32 lines
742 B
PHP

<?php
/**
* Created by PhpStorm.
* User: lcc
* Date: 2020/3/24
* Time: 15:10
*/
class HD_Service
{
public $CI;
protected $log_dir;
public function __construct()
{
$this->CI = & get_instance();
$this->log_dir = lcfirst(get_class($this));
}
function __get($name){
if('_model' === substr($name, -6)){
return $this->CI->$name;
} elseif('_service' === substr($name, -8)){
return $this->CI->$name;
} elseif('load' == $name){
return $this->CI->load;
} elseif('config' == $name){
return $this->CI->config;
} elseif(isset($this->CI->$name)){
return $this->CI->$name;
}
return null;
}
}