Exemple #1
0
 /**
  * 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);
 }
Exemple #2
0
/**
 * 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();
}