コード例 #1
0
ファイル: development.php プロジェクト: janpoem/kephp
<?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);
 }