/** * Constructor * * @access public * * @param array $config config array * * @result void */ public function __construct(array $config = []) { parent::__construct($config); $this->table = 'cache'; if (!empty($config['table'])) { $this->table = $config['table']; unset($config['table']); } $cls = $config['class']; $this->driver = new $cls($config); $this->driver->createTable($this->table, ['`name` VARCHAR(127) NOT NULL', '`value` TEXT NULL', '`duration` INT(11) NOT NULL', '`date_create` INT(11) NOT NULL', 'UNIQUE(`name`)'], ''); }