system/libraries/Cache.php 1 location
|
@@ 51-58 (lines=8) @@
|
48 |
|
*/ |
49 |
|
public function __construct($config = false) |
50 |
|
{ |
51 |
|
if (is_string($config)) { |
52 |
|
$name = $config; |
53 |
|
|
54 |
|
// Test the config group name |
55 |
|
if (($config = Kohana::config('cache.'.$config)) === null) { |
56 |
|
throw new Kohana_Exception('cache.undefined_group', $name); |
57 |
|
} |
58 |
|
} |
59 |
|
|
60 |
|
if (is_array($config)) { |
61 |
|
// Append the default configuration options |
system/libraries/drivers/Session/Cache.php 1 location
|
@@ 42-49 (lines=8) @@
|
39 |
|
if (empty($config)) { |
40 |
|
// Load the default group |
41 |
|
$config = Kohana::config('cache.default'); |
42 |
|
} elseif (is_string($config)) { |
43 |
|
$name = $config; |
44 |
|
|
45 |
|
// Test the config group name |
46 |
|
if (($config = Kohana::config('cache.'.$config)) === null) { |
47 |
|
throw new Kohana_Exception('cache.undefined_group', $name); |
48 |
|
} |
49 |
|
} |
50 |
|
|
51 |
|
$config['lifetime'] = (Kohana::config('session.expiration') == 0) ? 86400 : Kohana::config('session.expiration'); |
52 |
|
$this->cache = new Cache($config); |
system/libraries/Encrypt.php 1 location
|
@@ 51-58 (lines=8) @@
|
48 |
|
throw new Kohana_Exception('encrypt.requires_mcrypt'); |
49 |
|
} |
50 |
|
|
51 |
|
if (is_string($config)) { |
52 |
|
$name = $config; |
53 |
|
|
54 |
|
// Test the config group name |
55 |
|
if (($config = Kohana::config('encryption.'.$config)) === null) { |
56 |
|
throw new Kohana_Exception('encrypt.undefined_group', $name); |
57 |
|
} |
58 |
|
} |
59 |
|
|
60 |
|
if (is_array($config)) { |
61 |
|
// Append the default configuration options |