/** * Global key/value store setter * * @param string $key * @param mixed $value * @return void */ public static final function set($key, $value) { Keep::getInstance()->set($key, $value); }
/** * Keep helper * * @param string $key * @param mixed $value * @return \Eco\Factory\Keep */ function keep($key = null, $value = null) { if (func_num_args() === 1) { return Keep::getInstance()->get($key); } else { if (func_num_args() === 2) { Keep::getInstance()->set($key, $value); } } return Keep::getInstance(); }