Exemple #1
0
/**
 * cycles a value in an iterator
 * @uses cycle('odd', 'even')
 */
function cycle()
{
    $args = func_get_args();
    $class = Cycler::getInstance();
    $key = md5(join('', $args));
    if (!$class->cycler_exsits($key)) {
        $class->set_cycler($key, $args);
        return $class->get_cycler($key);
    } else {
        return $class->get_cycler($key);
    }
}