123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- require_once(dirname(__FILE__) . '/wechat-php-sdk/wechat.class.php');
- class CI_Wechat extends Wechat {
- protected $_CI;
- public function __construct() {
- $this->_CI =& get_instance();
- $this->_CI->config->load('wechat');
- $options = $this->_CI->config->item('wechat');
- $this->_CI->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file'));
- parent::__construct($options);
- }
-
- protected function setCache($cachename, $value, $expired) {
- return $this->_CI->cache->save($cachename, $value, $expired);
- }
-
- protected function getCache($cachename) {
- return $this->_CI->cache->get($cachename);
- }
-
- protected function removeCache($cachename) {
- return $this->_CI->cache->delete($cachename);
- }
- }
|