27 lines
574 B
PHP
27 lines
574 B
PHP
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Base
|
|
{
|
|
public $ifcache = true;
|
|
|
|
public function __get($property_name)
|
|
{
|
|
$func = 'get_'.$property_name;
|
|
if ($this->$property_name){
|
|
return $this->$property_name;
|
|
} elseif(method_exists($this, $func))
|
|
{
|
|
return $this->$property_name = $this->$func();
|
|
} else {
|
|
return $this->$property_name = false;
|
|
}
|
|
}
|
|
|
|
public function get_ci()
|
|
{
|
|
$ci = &get_instance();
|
|
return $ci;
|
|
}
|
|
} |