Exemplo n.º 1
0
/**
 * Session flash helper
 *
 * @param string $key
 * @param mixed $value
 * @return \Eco\Factory\Session\Flash
 */
function flash($key = null, $value = null)
{
    if (func_num_args() === 1) {
        System::flash()->get($key);
    } else {
        if (func_num_args() === 2) {
            System::flash()->set($key, $value);
        }
    }
    return System::flash();
}
Exemplo n.º 2
0
/**
 * Flash error getter
 *
 * @return string
 */
function flash_error_get()
{
    return System::flash()->get('error');
}