public function __construct($config = array()) { // merge core components with custom components foreach ($this->coreComponents() as $id => $component) { if (!isset($config['components'][$id])) { $config['components'][$id] = $component; } elseif (is_array($config['components'][$id]) && !isset($config['components'][$id]['class'])) { $config['components'][$id]['class'] = $component['class']; } } parent::__construct($config); }
/** * 获取Cache组件 * * @return BaseCache */ public function getCache() { return $this->wechat->getCache(); }