示例#1
0
<?php

/**
 * kephp development env config file.
 */
use Ke\Adm;
use Ke\Utils\DocMen\DocMen;
//DocMen::getInstance('doc')->setShowFile(true)->setGenerable(true)->setWithWiki(true);
// Database config
Adm\Db::define(['default' => ['adapter' => 'mysql', 'db' => '', 'user' => '', 'prefix' => '']]);
// Cache config
Adm\Cache::define(['default' => ['adapter' => 'redis']]);
示例#2
0
文件: Model.php 项目: janpoem/kephp
 public static function getCacheAdapter()
 {
     if (!static::isEnableCache()) {
         throw new Exception(sprintf('Model "%s" undefined cache source or the model without primary key!', static::class));
     }
     return Cache::getAdapter(static::$cacheSource);
 }