public function cache($bool = true) { /* Polymorphism */ if (is_int($bool)) { if ($bool == 0) { $bool = false; } elseif ($bool == 1) { $bool = true; } elseif (60 <= $bool) { Config::set('database.cache.ttl', $bool); } else { $bool = true; } } $this->cache = $bool; return $this; }
function set($key, $value) { return Config::set('helper.' . $key, $value); }